C# 连接数据库操作
using System.Data;
using System.Data.SqlClient;
在加入command后
using System.Configuration
using System;
using System.Collections.Generic;
using System Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
public partial class _Default :System.Web.UI.Page
{
if(!IsPostBack)
{
string str;
}
}
SqlCommand类
Transact-SQL
CommandText
CommandTimeOut
如果command是SQL语句,commandType为文本
如果command是存储结构,commandType为存储结构名
Visual Studio 2012操作界面说明
打开服务器资源管理器
mdf文件打开形式
mdb文件打开形式
学生选课.mdb
password:123
自动连接时也要将密码对应的代码块加进去
Jet OLEDB:Database Password=123
否则会出错
打开工具箱