求救:[Microsoft][ODBC Microsoft Access Driver] FROM 子句语法错误
<%DimrsDimconnpublicstrsnostrsno=Request.QueryString("sno")subGet_Record()Setrs=Nothi...
<%
Dim rs
Dim conn
public strsno
strsno = Request.QueryString("sno")
sub Get_Record()
Set rs = Nothing
Set conn = Nothing
Set conn=Server.CreateObject("ADODB.Connection")
strConn="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("user.mdb")
conn.Open strConn
strsql="select * from course"
strsql=strsql & "where sno=" & trim(strno)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql,strConn,,,adCmdText
End sub
错误在倒数第五行,表名没有拼错,实在看不出是哪里出错. 展开
Dim rs
Dim conn
public strsno
strsno = Request.QueryString("sno")
sub Get_Record()
Set rs = Nothing
Set conn = Nothing
Set conn=Server.CreateObject("ADODB.Connection")
strConn="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("user.mdb")
conn.Open strConn
strsql="select * from course"
strsql=strsql & "where sno=" & trim(strno)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql,strConn,,,adCmdText
End sub
错误在倒数第五行,表名没有拼错,实在看不出是哪里出错. 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询