建表保存查询结果时老是出错,知道的朋友帮忙看下
这段代码试了很长时间都错,老是出现下面的问题 ,知道的朋友告诉下
HTTP 错误 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务
技术信息(用于支持人员)
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]'=' 附近有语法错误。
/aspweb/chaxunasp.asp, 第 15 行
代码如下:<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={SQL Server};Server=APP144;Database=mydb;UID=sa;PWD=123456;"
Command = "select * from student_course where sid="&request("sid")
Set rs = conn.Execute(command,recordsAffected,adcmd)
Response.Write "<TABLE border=2>"
Response.Write "<TR>"
For i=0 To rs.fields.count-1
Response.Write "<TD>"&Ucase(rs(i).Name)&"</TD>"
Next
Response.Write "</TR>"
While not rs.EOF
Response.Write "<TR>"
For i=0 To rs.fields.count-1
Response.Write "<TD>"&rs(i).value&"</TD>"
Next
Response.Write "</TR>"
rs.MoveNext
Wend
Response.Write "</TABLE>"
Set conn = nothing
%>