熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

asp+access sql insert into select表復制

2022-06-13   來源: .NET編程 

  這裡是把一個同的數據一次性保存到另一個表用的是sql insert into  select另一張同結構的新表

  sub append()
call opendb()
dim zsqlzdysql
zsql="insert into zdgz select titles_nameuser_fromimagecontentsend_dateisture from zdy "
 connexecute(zsql)
 if err= then
  responsewrite("<br><hr>")
 responsewrite("<font  class=style >Data successful merger</font><hr><br>")
 connexecute("delete * from zdy")
 else
  responsewrite("<br><hr><br>")
 responsewrite("<font  class=style>If you are repeatedly running a home data merge successfullyIf 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=serverCreateObject("adodbrecordset")
set conn=serverCreateObject("adodbconnection")
connconnectionstring="provider=microsoftjetoledb; data source="&servermappath("datasource/hhinfomdb")
connopen
end sub

  
 


From:http://tw.wingwit.com/Article/program/net/201311/14086.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.