我如何使用访问数据库链接,填满<>GridView?
到目前为止,我有以下法典:
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();
但现在情况如何?