如何GridView
使用与 Access 数据库的连接来填充?
到目前为止,我有以下代码:
OleDbConnection myConnection = default(OleDbConnection);
OleDbCommand myCommand = default(OleDbCommand);
string strSQL = null;
strSQL = "SELECT * FROM tblLoginInfo " + "WHERE username='" + CustID.Replace("'", "''") + "' " + "AND password='" + CustPass.Replace("'", "''") + "';";
myConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " + "Data Source=" + Server.MapPath("login.mdb") + ";");
myCommand = new OleDbCommand(strSQL, myConnection);
myConnection.Open();
但是现在呢?