教程集 www.jiaochengji.com
教程集 >  脚本编程  >  Asp  >  正文 asp access sql insert into select表复制

asp access sql insert into select表复制

发布时间:2016-09-28   编辑:jiaochengji.com
教程集为您提供asp access sql insert into select表复制 等资源,欢迎您收藏本站,我们将为您提供最新的asp access sql insert into select表复制 资源

这里是把一个同的数据一次性保存到另一个表,用的是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

本站原创转载注明 www.jiaochengji.com

您可能感兴趣的文章:
asp access sql insert into select表复制
mysql中insert into,replace into,insert ignore的区别
asp 导航excel数据到mssql access mysql 等数据方法
mysql批量插入insert into select与select into的区别
select into 和 insert into
MySQL中INSERT INTO SELECT语句的用法
php连接Access数据库的方法小结
php 导入mysql数据到access方法
asp 保存数据与批量删除数据方法
php与ajax无刷新分页的实现代码(兼容多浏览器)

[关闭]
~ ~