亚洲第一国产综合野狼_中文字幕有码~第一页_一级少妇精品久久久久久久_亚洲中文字幕永久在线不卡

<pre id="bxsy8"><tt id="bxsy8"><rt id="bxsy8"></rt></tt></pre>
  • <span id="bxsy8"><var id="bxsy8"></var></span>
  • <menu id="bxsy8"></menu>
    1. 站內(nèi)搜索  

      哈爾濱百姓網(wǎng)首頁 | 操作系統(tǒng) | 軟件應用 | 平面設計 | 程序開發(fā) | 硬件維護 | 網(wǎng)絡安全
       您的位置: 哈爾濱百姓網(wǎng) > 電腦網(wǎng)絡 > 程序開發(fā) > 閱讀文章:把數(shù)據(jù)庫結構顯示出來的源代碼
      把數(shù)據(jù)庫結構顯示出來的源代碼
      2009-4-17 9:55:16 哈爾濱百姓網(wǎng) 來源:百度空間 瀏覽 次 【 】【打印】【關閉

      通過以上的代碼即可顯示表的結構,字段類型,長度,自動編號,主健。如果你仔細研究后就可以發(fā)現(xiàn)如何遠程改變數(shù)據(jù)庫的結構了,祝你好運!

      要查看此演示,需要你建立一個數(shù)據(jù)源,request("table")改為你的表的名字。
      <html>
      <head>
      <title>main</title>
      <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
      </head>
      <body bgcolor="#CCCCCC" text="#000000">
      <h2 align="center"><font face="華文新魏">歡迎查看chenyangasp演示程序</font></h2>
      <p>  
      <%
      on error resume next
      table=request("table")
      //獲得表名
      if table<>"" then
         response.write "數(shù)據(jù)表:"&table
      Set primary = con.OpenSchema(adSchemaPrimaryKeys, _
               Array(empty, empty, table))
      if primary("COLUMN_NAME")<>"" then
      primarykey=primary("COLUMN_NAME")
      end if
      primary.close
      set primary=nothing
      %>
      </p>
      <center>
         <table width="650" border="1" cellpadding="0" cellspacing="0">
           <tr bgcolor="#CCCCCC">  
             <th class="sundog" width="61">  
               <div align="center">字段</div>
             </th>
             <th class="sundog" width="131">  
               <div align="center">類型</div>
             </th>
             <th class="sundog" width="105">  
               <div align="center">設定大小</div>
             </th>
             <th class="sundog" width="69">  
               <div align="center">允許空值</div>
             </th>
             <th class="sundog" width="69">  
               自動編號
             </th>
             <th class="sundog" width="81">主鍵</th>
             </tr>
      <%sql="select * from ["&table&"] "
         set rs=con.execute(sql)
         for i=0 to rs.fields.count-1
      %>
           <tr bgcolor="#CCCCCC">  
             <td class="sundog" height="2" width="61">  
               <div align="center"><%=rs(i).name%></div>
      //字段名       
      </td>
             <td class="sundog" height="2" width="131">  
               <div align="center">  
                 <%
      field_type=rs(i).type
      select case field_type
           case adEmpty
             typ = "Empty"
           case adTinyInt
             typ = "TinyInt"
           case adSmallInt
             typ = "SmallInt"
           case adInteger
             typ = "Integer"
           case adBigInt
             typ = "BigInt"
           case adUnsignedTinyInt
             typ = "UnsignedTinyInt"
           case adUnsignedSmallInt
             typ = "UnsignedSmallInt"
           case adUnsignedInt
             typ = "UnsignedInt"
           case adUnsignedBigInt
             typ = "UnsignedBigInt"
           case adSingle
             typ = "Single"
           case adDouble
             typ = "Double"
           case adCurrency
             typ = "Currency"
           case adDecimal
             typ = "Decimal"
           case adNumeric
             typ = "Numeric"
           case adBoolean
             typ = "Boolean"
           case adError
             typ = "Error"
           case adUserDefined
             typ = "UserDefined"
           case adVariant
             typ = "Variant"
           case adIDispatch
             typ = "IDispatch"
           case adIUnknown
             typ = "IUnknown"
           case adGUID
             typ = "GUID"
           case adDATE
             typ = "DATE"
           case adDBDate
             typ = "DBDate"
           case adDBTime
             typ = "DBTime"
           case adDBTimeStamp
             typ = "DBTimeStamp"
           case adBSTR
             typ = "BSTR"
           case adChar
             typ = "Char"
           case adVarChar
             typ = "VarChar"
           case adLongVarChar
             typ = "LongVarChar"
           case adWChar
             typ = "WChar"
           case adVarWChar
             typ = "VarWChar"
           case adLongVarWChar
             typ = "LongVarWChar"
           case adBinary
             typ = "Binary"
           case adVarBinary
             typ = "VarBinary"
           case adLongVarBinary
             typ = "LongVarBinary"
           case adChapter
             typ = "Chapter"
           case adPropVariant
             typ = "PropVariant"
           case else
             typ = "Unknown"
         end select
      response.write typ%>
      //字段類型  
              </div>
             </td>
             <td class="sundog" height="2" width="105">  
               <div align="center"><%=rs(i).definedsize%></div>
             </td>
      //字段長度

             <td class="sundog" height="2" width="69">  
               <div align="center">  
                 <%
         attrib=rs(i).attributes
         if (attrib and adFldIsNullable)=0 then
           response.write "No"
         else
           response.write "Yes"
         end if
      %>
               </div>
             </td>

      //是否允許空值

             <td class="sundog" height="2" width="69">
               <div align="center">  
      <%if rs(i).Properties("ISAUTOINCREMENT") = True then%>
                 <input type="checkbox" name="autoincrement" value="checkbox" checked>
      <%else%>
                 <input type="checkbox" name="autoincrement" value="checkbox">
      <%end if%>         
               </div>
             </td>

      //是否為自動編號

             <td class="sundog" height="2" width="81">  
               <div align="center">  
                 <%if rs(i).name=primarykey then%>
                 <input type="checkbox" name="primarykey" value="checkbox" checked>
                 <%else%>
                 <input type="checkbox" name="primarykey" value="checkbox">
                 <%end if%>
               </div>
             </td>

      //主健

            </tr>
           <%next %>
         </table>
      </center>
      [責任編輯:佚名]
       相關文章
      ·CSS布局方法的十八般技巧和兼容方案 (2009-11-13 17:14:48)
      ·利用Google給自己的網(wǎng)站加上投票功能 (2009-10-13 12:32:39)
      ·您試圖在此 Web 服務器上訪問 (2009-8-13 14:20:12)
      ·Asp偽靜態(tài)的實現(xiàn)及URL重寫-用ISAPI_Rewri (2009-8-6 15:07:08)
      ·巧用ASP腳本命令重啟服務器 (2009-8-6 15:05:39)
      ·Dreamweaver CS3網(wǎng)頁制作之CSS布局 (2009-7-1 16:07:45)
      ·網(wǎng)頁設計經(jīng)驗和技巧總結 (2009-7-1 16:03:12)
      ·網(wǎng)頁優(yōu)化必須做的26件事情 (2009-7-1 16:00:36)
      ·插入記錄后馬上得到自動編號值(Access庫) (2009-4-17 9:54:33)
      ·全面解決--如何獲得剛插入數(shù)據(jù)庫的記錄的 (2009-4-17 9:53:29)
      ·ASP計算兩個時間之差的函數(shù) (2009-4-17 9:52:11)
      ·一個通用數(shù)據(jù)庫顯示程序,能調(diào)任意庫,任意 (2009-4-17 9:50:33)
      ·技巧:ASP開發(fā)中存儲過程應用全接觸 (2009-4-17 9:48:31)
      ·網(wǎng)站簡體繁體轉(zhuǎn)換代碼 (2009-4-17 9:44:15)
      ·ASP導出Excel數(shù)據(jù)的四種方法 (2009-4-17 9:42:14)
      ·利用網(wǎng)頁監(jiān)聽,實現(xiàn)內(nèi)容中的圖片由滾輪控 (2009-4-17 9:37:21)
      ·html操作本地數(shù)據(jù)庫 (2009-4-17 9:33:18)
      ·Access中使用Create Procedure創(chuàng)建 (2009-4-17 9:31:08)
      ·asp實現(xiàn)同網(wǎng)站不同目錄綁定不同域名 (2009-4-17 9:27:57)
       熱門文章 哈爾濱電腦
      ·安全防護策略-打造堡壘主機
      ·SQL Server到底需要使用哪些端口?
      ·把重要的Word 2003文檔放到菜單中
      ·您試圖在此 Web 服務器上訪問的 
      ·Photoshop制作火焰的神龍
      ·Win2003架設多用戶隔離Ftp服務器
      ·XP系統(tǒng)服務恢復批處理
      ·還有2天發(fā)布 Windows7必備77條小知識
      ·情侶玩兒法:用虛擬硬盤打造堅不可摧的影子系統(tǒng)
      ·用U盤當鑰匙 輕松繞過WinXP的登陸密碼
      ·Photoshop打造漂亮的心形掛鏈壁紙
       推薦文章 哈爾濱電腦
      ·精簡節(jié)約!小公司辦公打印省錢全攻略
      ·CSS布局方法的十八般技巧和兼容方案
      ·三種方法 教你解決輸入法不顯示的問題
      ·當紅情侶QQ表情:茉莉和龍井
      ·Win 7出現(xiàn)休眠Bug 微軟提供解決方案
      ·將Powerpoint文檔轉(zhuǎn)換為Word文檔
      ·非常實用來學習連續(xù)供墨系統(tǒng)入門知識
      ·怕吃虧?怕假的?鑒別真假耗材的小竅門
      ·情侶玩兒法:用虛擬硬盤打造堅不可摧的影子系統(tǒng)
      ·開始—運行(cmd)命令大全
      ·您試圖在此 Web 服務器上訪問的 
       最新文章 哈爾濱電腦
      ·Web服務器如何避免CC攻擊
      ·SQL Server到底需要使用哪些端口?
      ·XP系統(tǒng)服務恢復批處理
      ·局域網(wǎng)遭ARP攻擊網(wǎng)絡掉線批處理
      ·CISCO 2811 路由器配置命令全集
      ·避免“悲劇” 打印機使用技巧全面攻略
      ·保障遠程桌面Web連接安全四項注意
      ·教你六招處理服務器數(shù)據(jù)意外丟失
      ·挑選相紙有學問 教你如何辨別相紙優(yōu)劣
      ·精簡節(jié)約!小公司辦公打印省錢全攻略
      ·CSS布局方法的十八般技巧和兼容方案