【发布时间】:2016-09-28 00:42:14
【问题描述】:
你能帮我处理一下我的 sql 语句吗? studentID 和 password 都是文本。 我以为我弄清楚了单引号和双引号,但显然不是因为我收到错误“BOF 或 EOF 为真,或者当前记录已被删除。请求的操作需要当前记录”。
我的表成员中有记录。
var mycon;
mycon = new ActiveXObject("ADODB.Connection");
var myrec ;
myrec= new ActiveXObject("ADODB.Recordset");
mycon.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Database2.mdb");
var txtpassword = Request.QueryString("txtpassword");
var txtuserID = parseInt (Request.QueryString("txtuserID"));
var sql;
sql = "SELECT * FROM Members WHERE StudentID='"+txtuserID+"'AND Password='"+txtpassword+"'";
myrec.Open (sql, mycon);
【问题讨论】:
标签: sql asp.net sql-server ado