提示第16行错误
<body>
<form id= "form1 " name= "form1 " method= "post " action= " ">
<%dim i
i=trim(Request.QueryString( "userNUM "))
if i <> " " then
dim Recordset3
Set Recordset3 = Server.CreateObject( "ADODB.Recordset ")
Recordset3.ActiveConnection = MM_conn_STRING //这是第16行
Recordset3.Source = "SELECT * FROM TESTJF where TEST1= "& " ' "&i& " ' "
Recordset3.CursorType = 0
Recordset3.CursorLocation = 2
Recordset3.LockType = 1
Recordset3.Open()
if Recordset3.eof then
Dim Recordset1
Set Recordset1 = Server.CreateObject( "ADODB.Connection ")
Recordset1.ConnectionString = MM_conn_STRING
Recordset1.Open()
strSQL= "INSERT INTO TESTJF (TEST1)VALUES( ' "&i& " ') "
Recordset1.Execute(strSQL)
Recordset1.Close()
Set Recordset1 = Nothing
response.Write( "您的积分代码是 "&chr(10))
response.Write(i)
else
response.Write( "您的积分代码是 "&chr(10))
response.Write(i)
end if
Recordset3.Close()
Set Recordset3 = Nothing
else
response.Write( "请输入您的ID ")
end if
%>
<input type= "text " name= "textfield " value= " "/>
</form>
</body>
------解决方案--------------------数据库连接出错了~`看看路径对不对~
------解决方案--------------------Recordset3.ActiveConnection = MM_conn_STRING 是一个已经打开的Connection对象就对了,看你的代码MM_conn_STRING是个连接的字符串吧,所以就错了
------解决方案--------------------Recordset3.ActiveConnection =這是應該是一個連接對象,而MM_conn_STRING是一個連接字符串