Set qs = Server.CreateObject("ADODB.Recordset")
tm="Servfghgfjgnermappath"
sqlq="update news set tp1=" & tm
qs.Source=sqlq
qs.open sqlq,conn,2,3
为什么不能更新?
sqlq="update news set tp1=" & tm & ""
这样就行啦
有错误提示吗?
你的字段是什么类型啊??
不是数字型要加
首先确实数据库是否正常连接
然后:
tm="Servfghgfjgnermappath"
Set qs = Server.CreateObject("ADODB.Recordset")
sqlq="update news set tp1="&tm&"" 变量tm是字符型的,不是数字型
conn.execute(sqlq) 或是你写的qs.open sqlq,conn,2,3
不会吧,我发贴时回复还是0,怎么等我发完贴,就回复为6了,唉,动作还是太慢了,呵呵
用command对象
set cmd=server.createobject("adodb.command")
cmd.activeconnection=conn conn是你建立的connection对象
cmd.commandText="update news set tp1=tm"
cmd.execute