缺少标识符?
<%ifrequest.QueryString("vote")="1"thenDimrs2Dimrs2_cmdDimrs2_numRowsDimrs2_xuehaors2...
<%
if request.QueryString("vote")="1" then
Dim rs2
Dim rs2_cmd
Dim rs2_numRows
Dim rs2_xuehao
rs2_xuehao=request.QueryString(Session("xuehao"))
Set rs2_cmd = Server.CreateObject ("ADODB.Command")
rs2_cmd.ActiveConnection = MM_conn_STRING
rs2_cmd.CommandText = "SELECT * FROM voter WHERE xuehao=rs2_xuehao"
rs2_cmd.Prepared = true
Set rs2 = rs2_cmd.Execute
rs2_numRows = 0
if rs2.recordcount<>0 then'如果学号已经存在
response.Write(msgbox("你已经投过票了!"))'则弹出对话框
else '否则
dim t_name_new
t_name_new=request.QueryString("t_name")
rs2.addnew
rs2.("xuehao")=rs2_xuehao
rs2.("v_teacher")=t_name_new
rs2.update'在rs2数据记录集中插入新纪录
end if
else
end if
%>
调试的时候出现错误,说rs2.("xuehao")=rs2_xuehao这一行缺少标识符。这是为什么啊?
错误信息如下:
Microsoft VBScript 编译器错误 错误 '800a03f2'
缺少标识符
/more_vote_index.asp,行 24
rs2.("xuehao")=rs2_xuehao
----^ 展开
if request.QueryString("vote")="1" then
Dim rs2
Dim rs2_cmd
Dim rs2_numRows
Dim rs2_xuehao
rs2_xuehao=request.QueryString(Session("xuehao"))
Set rs2_cmd = Server.CreateObject ("ADODB.Command")
rs2_cmd.ActiveConnection = MM_conn_STRING
rs2_cmd.CommandText = "SELECT * FROM voter WHERE xuehao=rs2_xuehao"
rs2_cmd.Prepared = true
Set rs2 = rs2_cmd.Execute
rs2_numRows = 0
if rs2.recordcount<>0 then'如果学号已经存在
response.Write(msgbox("你已经投过票了!"))'则弹出对话框
else '否则
dim t_name_new
t_name_new=request.QueryString("t_name")
rs2.addnew
rs2.("xuehao")=rs2_xuehao
rs2.("v_teacher")=t_name_new
rs2.update'在rs2数据记录集中插入新纪录
end if
else
end if
%>
调试的时候出现错误,说rs2.("xuehao")=rs2_xuehao这一行缺少标识符。这是为什么啊?
错误信息如下:
Microsoft VBScript 编译器错误 错误 '800a03f2'
缺少标识符
/more_vote_index.asp,行 24
rs2.("xuehao")=rs2_xuehao
----^ 展开
展开全部
<%
if request.QueryString("vote")="1" then
Dim rs2
Dim rs2_cmd
Dim rs2_numRows
Dim rs2_xuehao
rs2_xuehao=Session("xuehao")
Set rs2_cmd = Server.CreateObject("ADODB.Command")
rs2_cmd.ActiveConnection = MM_conn_STRING
rs2_cmd.CommandText = "SELECT * FROM voter WHERE xuehao='"&rs2_xuehao&"'"
rs2_cmd.Prepared = true
Set rs2 = rs2_cmd.Execute
rs2_numRows = 0
if rs2.recordcount<>0 then'如果学号已经存在
response.Write("你已经投过票了!")'则弹出对话框
response.end
else '否则
dim t_name_new
t_name_new=request.QueryString("t_name")
rs2.addnew
rs2("xuehao")=rs2_xuehao
rs2("v_teacher")=t_name_new
rs2.update'在rs2数据记录集中插入新纪录
end if
end if
%>
if request.QueryString("vote")="1" then
Dim rs2
Dim rs2_cmd
Dim rs2_numRows
Dim rs2_xuehao
rs2_xuehao=Session("xuehao")
Set rs2_cmd = Server.CreateObject("ADODB.Command")
rs2_cmd.ActiveConnection = MM_conn_STRING
rs2_cmd.CommandText = "SELECT * FROM voter WHERE xuehao='"&rs2_xuehao&"'"
rs2_cmd.Prepared = true
Set rs2 = rs2_cmd.Execute
rs2_numRows = 0
if rs2.recordcount<>0 then'如果学号已经存在
response.Write("你已经投过票了!")'则弹出对话框
response.end
else '否则
dim t_name_new
t_name_new=request.QueryString("t_name")
rs2.addnew
rs2("xuehao")=rs2_xuehao
rs2("v_teacher")=t_name_new
rs2.update'在rs2数据记录集中插入新纪录
end if
end if
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询