function replace(title) { replace(title,'aaa','bbbb') return(title) } bbb=replace(title) update ..... set title='"&bbb&"'
ASP+access批量替换指定字符参考代码:
复制代码 代码如下:
<% Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("数据库名.mdb") Set rs = Server.Createobject("ADODB.Recordset") sql="Select * from [表名]" rs.open sql,conn,1,3 while not rs.eof rs("字段名")=replace(rs("字段名"),"被替换的字符","替换为的字符") rs.update rs.movenext wend rs.close set rs=nothing conn.close set conn=nothing %>