<%
set conn=server.CreateObject("adodb.connection")
conn.connectionstring="provider=microsoft.jet.oledb.4.0;data source="&server.MapPath("1.mdb")
conn.open
sql="select * from oblog_user"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,2,3
if not rs.bof then
rs.movefirst
end if
do while not rs.eof
if rs("user_domainroot")="" then
set rs("user_domainroot")="http://www.sina.com"
end if
if rs("user_domain")="" then
user1=rs("username")
set rs("user_domain")=user1
end if
rs.update
rs.movenext
loop
%>
运行不报错,可是数据有的还是空的,还是没改,请问一下错在哪!
谢谢!
<%
set conn=server.CreateObject("adodb.connection")
conn.connectionstring="provider=microsoft.jet.oledb.4.0;data source="&server.MapPath("1.mdb")
conn.open
sql="select * from oblog_user"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,2,3
do while not rs.eof
if rs("user_domainroot")="" then
rs("user_domainroot")="http://www.sina.com"
end if
if rs("user_domain")="" then
user1=rs("username")
rs("user_domain")=user1
end if
rs.update
rs.movenext
loop
%>
这样试一试呢?
<%
set conn=server.CreateObject("adodb.connection")
conn.connectionstring="provider=microsoft.jet.oledb.4.0;data source="&server.MapPath("1.mdb")
conn.open
sql="select * from oblog_user"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,2,3
if not rs.bof then
rs.movefirst
end if
do while not rs.eof
if trim(rs("user_domainroot"))="" then
rs("user_domainroot")="http://www.sina.com"
end if
if trim(rs("user_domain"))="" then
user1=rs("username")
rs("user_domain")=user1
end if
rs.update
rs.movenext
loop
%>