日期:2014-05-17 浏览次数:20969 次
set conn=server.CreateObject("adodb.connection") conn.connectionstring="Provider=SQLOLEDB;Server=XXXX;Database=xx;UID=sa;pwd=xx" conn.open djh=request("djh") set rs=server.CreateObject("adodb.recordset") Sql="SELECT * FROM tb WHERE djh='"&djh&"' order by xh" rs.open sql,conn,2,3 if request("sub")<>""then Do While Not rs.EOF rs("mddf")=1111 rs.update rs.movenext loop
<% set conn = server.CreateObject("adodb.connection") conn.connectionstring="Provider=SQLOLEDB;Server=XXXX;Database=xx;UID=sa;pwd=xx" conn.open djh=request("djh") set rs=server.CreateObject("adodb.recordset") Sql="SELECT * FROM tb WHERE djh='" & Replace(djh, "'","''") & "'" rs.CursorLocation = 3 rs.open sql,conn,1,3 If Not (rs.EOF And rs.BOF) Then Do While Not rs.EOF rs("mddf")=1111 rs.movenext loop rs.update End If rs.Close Set rs = Nothing conn.Close Set conn = Nothing %>