ASP下实现自动采集程序及入库的代码(2)
'打开数据库,准备入库
dim connstr,conn,rs,sql
connstr="DBQ="+server.mappath("db1.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
set rs=server.createobject("adodb.recordset")
sql="select [列名] from [表名] where [列名]='"&Title&"'"
rs.open sql,conn,3,3
if rs.eof and rs.bof then
rs("列名")=Title
rs.update
set rs=nothing
end if
set rs=nothing
Response.Write"采集完毕!"
%>