大家帮我看一下,语法错在哪了~
<%
set sjk=server.CreateObject( "adodb.recordset ")
sjk.open "select * from user where u_user= ' " & request.Form( "t_user ") & " ' ",conn1 '%%%%%%%% 测试时说,我这里语法错误 %%%%%%%
if sjk.count> 0 then
response.Write( "用户 " & request.Form( "u_user ") & "已经存在,用其他的吧! ")
sjk.close
set sjk=nothing
conn1.close
set conn1=nothing
response.End
else
sjk.close
sjk.open "user " ,conn1,1,3
sjk.addnew
sjk( "u_user ")=request.Form( "t_user ")
sjk( "u_code ")=request.Form( "t_code ")
sjk.update
sjk.close
end if
%>
------解决方案--------------------try
sjk.open "select * from [user] where u_user= ' " & request.Form( "t_user ") & " ' ",conn1
------解决方案--------------------user是MS SQL的關鍵字,使用時要前後加上[].
------解决方案--------------------为什么要取这么特殊的表名?呵呵。有些不好的习惯还在表名之间空格,比如:[Order List]
这样也挺麻烦。。。。。