<% dim username
username=Request.Form("theName")
set cnn=Server.CreateObject("ADODB.Connection")
cnn.Open "DSN=hy520;UID=sa;PWD=19840522;Database=mydatab"
set rs=Server.CreateObject("ADODB.RecordSet")
set rs.ActiveConnection=cnn
sql= "Select * From User Where username='"&Trim(username)&"'"
set rs=cnn.Execute(sql)
if rs.Eof then
Response.Write "此用户名可以使用!"
else
Response.Write "此用户名已经有人使用,请重新输入!"
end if
cnn.close
rs.close
set rs=nothing
%>
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]在关键字 'User' 附近有语法错误