日期:2014-05-17 浏览次数:20812 次
set rs=server.createobject("adodb.recordset") sql="select * from t_news" rs.open sql,conn,3,3 rs.addnew '添加记录到数据表末端 rs("title") = Request("title") rs("content") = Request.Form("editor1") rs("logtime") = now rs.update '更新数据表记录 rs.close set rs=nothing
<% set conn = CreateObject("ADODB.Connection") conn.Open "....." set rs = createobject("adodb.recordset") rs.CursorLocation = 3 sql = "select * from t_news where 1=0" rs.open sql,conn,1,3 rs.addnew rs("title") = Request("title") rs("content") = Request("editor1") rs("logtime") = now() rs.update rs.close set rs = nothing conn.close set conn = nothing %>