国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

批量復制數據

2024-05-04 10:58:44
字體:
來源:轉載
供稿:網友
現有表Special和表view數據結構相同的兩個表:
復制代碼 代碼如下:

Special
Specialid       NClass        name           pic
1                   黎明          火舞艷陽
2                   張學友      地久天長
3                   陳冠希      同名專輯
4                   郭富城      聽風的歌
view
Specialid       NClass        name           pic
1                   黎明          火舞艷陽      photo/200606192321.jpg
2                   張學友      地久天長      photo/200606192327.jpg
3                   劉德華      如果有一天 photo/200606192328.jpg
4                   郭富城      聽風的歌      photo/200606192329.jpg

要將VIEW中的PIC數據批量復制到Special中,(歌手名與專輯要完全相同),代碼如下:
復制代碼 代碼如下:
<% 
   dim conn    
   dim connstr 
   'on error resume next 
   connstr="DBQ="+server.mappath("p#1.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" 
   set conn=server.createobject("ADODB.CONNECTION") 
On Error Resume Next 
   conn.open connstr  
%> 
<html> 
<head> 
<title>管理軟件</title> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
</head> 
<body bgcolor="#FFFFFF" text="#000000"  > 
<table width=700 border="0" cellspacing="0" cellpadding="0"  align="center"><% 
   const MaxPerPage=100 
   dim totalPut    
   dim CurrentPage 
   dim TotalPages 
   dim i,j 
   if not isempty(request("page")) then 
      currentPage=cint(request("page")) 
   else 
      currentPage=1 
   end if 
%> 
<% 
set rs=server.CreateObject("adodb.recordset") 
rs.open "select  *  from Special inner join view on Special.name =view.name and Special.NClass=view.NClass",conn,1,1 
  if rs.eof and rs.bof then 
       response.write "<p align=center class=font>暫無軟件</p>" 
   else 
   totalPut=rs.recordcount 
      totalPut=rs.recordcount 
      if currentpage<1 then 
          currentpage=1 
      end if 
      if (currentpage-1)*MaxPerPage>totalput then 
    if (totalPut mod MaxPerPage)=0 then 
      currentpage= totalPut MaxPerPage 
    else 
       currentpage= totalPut MaxPerPage + 1 
    end if 
      end if 
       if currentPage=1 then 
            showContent 
            showpage totalput,MaxPerPage,"l.asp" 
       else 
          if (currentPage-1)*MaxPerPage<totalPut then 
            rs.move  (currentPage-1)*MaxPerPage 
            dim bookmark 
            bookmark=rs.bookmark 
            showContent 
             showpage totalput,MaxPerPage,"l.asp" 
        else 
         currentPage=1 
           showContent 
           showpage totalput,MaxPerPage,"l.asp" 
       end if 
    end if 
   rs.close 
   end if 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 鲁甸县| 息烽县| 临泽县| 南和县| 武平县| 浠水县| 宁陕县| 嵊州市| 荆门市| 射阳县| 桑植县| 萨嘎县| 壤塘县| 铜川市| 望谟县| 衡东县| 连州市| 田阳县| 鲁甸县| 弥渡县| 慈利县| 河北省| 华阴市| 永新县| 武宁县| 泽普县| 化州市| 延边| 义马市| 兴山县| 吴桥县| 镇坪县| 始兴县| 文山县| 曲周县| 平昌县| 孝感市| 井研县| 灵丘县| 河池市| 沁源县|