Microsoft JET Database Engine '80040e14' 帮忙看看

来源:百度知道 编辑:UC知道 时间:2024/05/26 08:33:13
Microsoft JET Database Engine '80040e14'

语法错误 (操作符丢失) 在查询表达式 'teachersid=' 中。

\wwwroot\teachguan1.asp, line 168

teachguan1.asp 的代码如下:
if session("teacherqx")=2 then
set conn=server.createobject("adodb.connection")
linkstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("school.mdb") & ";Persist Security Info=False"
conn.open linkstr
set rs=server.createobject("adodb.recordset")
str="select * from teachers where teachersid=" &teacherid
'response.write str
rs.open str,conn,1,3///////////这个是第168行
rs("teachjobdate")=vteachjobdate
if session("loginid")=1 then

rs("teachpassword")=md5(vteachpwd)
end if

str="select * from teachers where teachersid=" &teacherid
这句就是168行要执行的sql语句,因为你没有对teachid赋值,所以执行168行的那句话时就会有错误!

str="select * from teachers where teachersid=" &teacherid&""

if session("loginid")=1 then

rs("teachpassword")=md5(vteachpwd)
rs.update
end if