日期:2014-05-17  浏览次数:20867 次

rs.open用法出错
conn.asp文件
<%
dim   MM_conn_STRING_own
MM_conn_STRING_own   =   "Driver={SQL   Server};server=(local);uid=sa;pwd=;database=11; "
Set   conn   =   Server.Createobject( "ADODB.Connection ")
conn.open   MM_conn_STRING_own  
%>

<!--#include   file= "top.asp "-->

108行出错处
sql= "select   *   from   user   where   user_name= ' "&user_name& " ' "
rs.open   sql,MM_conn_STRING_own,3,3
if   not   rs.eof   then
        errmsg=errmsg+ " <br> "+ " <li> 用户名已被别人注册 "
        founderr=true
end   if
rs.close

错误信息
Microsoft   OLE   DB   Provider   for   ODBC   Drivers   '80040e14 '  

[Microsoft][ODBC   SQL   Server   Driver][SQL   Server]在关键字   'user '   附近有语法错误。




------解决方案--------------------
select * from [user]