<%
dim cnn,rstart,rstre,ssql,fso,fld,f,id,i
set cnn=server.createobject("adodb.connection")
set rstart=server.createobject("adodb.recordset")
set rstre=server.createobject("adodb.recordset")
set fso=server.createobject("scripting.filesystemobject")
set fld=fso.getfolder(server.mappath("./images"))
id=request.querystring("id")
cnn.connectionstring = "provider=sqloledb;data source=abc;uid=sa;pwd=123;database=test"
'打开到test数据库的连接
cnn.open
'在所选主题的浏次数上加1
ssql="update articles set view_times=view_times+1 where art_id=" & id
cnn.execute ssql,,adcmdtext
'创建原创帖子的记录集
ssql="select * from articles where art_id=" & id
set rstart=cnn.execute(ssql,,adcmdtext)
'创建回复帖子的记录集
ssql="select * from replies where art_id=" & id &_
"order by reply_time desc"
set rstre=cnn.execute(ssql,,adcmdtext)
%>
"Microsoft OLE DB Provider for SQL Server 错误 '80040e07'
将 varchar 值 'id' 转换为数据类型为 int 的列时发生语法错误。
/replytheme.asp,行26 "