复制一下代码保存为Asp文件运行
<%
dim strsql,connstr
connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("Data/#EasyCrm.mdb")
set conn= server.createObject("ADODB.Connection")
conn.open connstr
strsql="select * from Hetong"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open strsql,conn,1,3
'response.write "快"
conn.execute("select * from Hetong where Purview like '%操作员%'")
do while not rs.eof
rs("Purview")=Replace(rs("Purview"),"操作员","钱某")
rs.update
rs.movenext
loop
rs.close
set rs=nothing
Conn.close
Set conn = Nothing
%>
如果在其他文件中,可以用一下方法:
set rs0=server.CreateObject("adodb.recordset")
rs0.open "Select Purview from Hetong where Purview like '%"&OldName&"%'",conn,1,3
do while not rs0.eof
rs0("Purview")=Replace(rs0("Purview"),""&OldName&"",""&uName&"")
rs0.update
rs0.movenext
loop
rs0.close
set rs0=nothing
相关文章
Asp rs.AddNew不执行的问题2015-02-25
ASP获取当前页面完整的URL 2014-09-09
Asp中dateDiff 和instr的用法2013-10-22
Asp中调用Fckeditor.Asp不显示的原因2013-04-01
在Asp中判定某个字段是否包含“文字”2013-03-29
Asp中复选框查询及判定2013-03-27
Asp 知识汇总2013-03-27
objXmlHttp.send()报“80004005”错误的解决办法2013-03-21
Asp 根据IP跳转到相应国家页面代码2012-11-26
Godaddy Windows主机asp程序连接数据库路径的解决办法2012-10-10