string s = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\\学习\\Sql\x20\x20Server\\StudentI.mdf";
OleDbConnection conn = new OleDbConnection(s);
string txtCommand = "SELECT * FROM Student";
OleDbDataAdapter da = new OleDbDataAdapter(txtCommand, conn);
DataSet MyDataSet = new DataSet();
da.Fill(MyDataSet, "MyTable"); //在这句出错了。
提示:Could not use ''; file already in use.
怎么回事?
用的是vs2005,系统是windows 7 64bit ,
已经按照官网那的方法,Force the application to be compiled as a 32-bit application
刚接触数据库,是书上的例子。
谢谢了。
OleDbConnection conn = new OleDbConnection(s);
string txtCommand = "SELECT * FROM Student";
OleDbDataAdapter da = new OleDbDataAdapter(txtCommand, conn);
DataSet MyDataSet = new DataSet();
da.Fill(MyDataSet, "MyTable"); //在这句出错了。
提示:Could not use ''; file already in use.
怎么回事?
用的是vs2005,系统是windows 7 64bit ,
已经按照官网那的方法,Force the application to be compiled as a 32-bit application
刚接触数据库,是书上的例子。
谢谢了。
你的连接字符串肯定是有问题的。