这里是把一个同的数据一次性保存到另一个表,用的是sql insert into select另一张同结构的新表
sub append()
call opendb()
dim zsql,zdysql
zsql="insert into zdgz select title,s_name,user_from,image,content,send_date,isture from zdy "
conn.execute(zsql)
if err=0 then
response.write("<br><hr>")
response.write("<font class=style1 >Data successful merger</font><hr><br>")
conn.execute("delete * from zdy")
else
response.write("<br><hr><br>")
response.write("<font class=style1>If you are repeatedly running a home, data merge successfully.If you are running the first page, the data failed merger.</font><hr><br><br><br><br><br><br><p></p>")
end if
end sub
数据连接代码
sub opendb()
set rs=server.CreateObject("adodb.recordset")
set conn=server.CreateObject("adodb.connection")
conn.connectionstring="provider=microsoft.jet.oledb.4.0; data source="&server.mappath("datasource/hhinfo.mdb")
conn.open
end sub
……