语法错误 (操作符丢失) 在查询表达式 'vt_id=' 中。
subfillVote()viewstate("voteID")=executeSql("selecttop1vt_idfromvotetopicorderbyvt_id...
sub fillVote()
viewstate("voteID")=executeSql("select top 1 vt_id from votetopic order by vt_id desc","admin.mdb")
voteTitle.text=executeSql("select vt_name from votetopic where vt_id=" & viewstate("voteID"),"admin.mdb")
dim sql as string="select * from voteitem where vt_id=" & viewstate("voteID")
dim conn as new oledbconnection("provider=microsoft.jet.oledb.4.0; data source="+server.MapPath("data/admin.mdb"))
dim objreader as oledbdatareader
dim objcmd as new oledbcommand(sql,conn)
try
objcmd.connection.open()
objreader=objcmd.executereader()
vote.datasource=objreader
vote.databind()
catch ex as exception
response.Write(ex.message)
finally
objcmd.connection.close()
end try
end sub 展开
viewstate("voteID")=executeSql("select top 1 vt_id from votetopic order by vt_id desc","admin.mdb")
voteTitle.text=executeSql("select vt_name from votetopic where vt_id=" & viewstate("voteID"),"admin.mdb")
dim sql as string="select * from voteitem where vt_id=" & viewstate("voteID")
dim conn as new oledbconnection("provider=microsoft.jet.oledb.4.0; data source="+server.MapPath("data/admin.mdb"))
dim objreader as oledbdatareader
dim objcmd as new oledbcommand(sql,conn)
try
objcmd.connection.open()
objreader=objcmd.executereader()
vote.datasource=objreader
vote.databind()
catch ex as exception
response.Write(ex.message)
finally
objcmd.connection.close()
end try
end sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询