六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

如何把數據庫結構顯示出來的源代碼

[摘要]通過以上的代碼即可顯示表的結構,字段類型,長度,自動編號,主健。如果你仔細研究后就可以發現如何遠程改變數據庫的結構了,祝你好運!要查看此演示,需要你建立一個數據源,request("table")改為你的表的名字。<html><head><titl...
通過以上的代碼即可顯示表的結構,字段類型,長度,自動編號,主健。如果你仔細研究后就可以發現如何遠程改變數據庫的結構了,祝你好運!

要查看此演示,需要你建立一個數據源,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 "數據表:"&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>





主站蜘蛛池模板: 性久久久久 | 欧美一区日韩精品 | 日韩欧美国产另类 | 色综合久久久 | 午夜手机福利视频 | 亚洲成a人片在线观看中文 亚洲成a人片在线观看精品 | 四虎永久在线免费观看 | 一级做a爰片性色毛片思念网 | 欧美一区二区三区在线可观看 | 亚洲精品乱码久久久久久中文字幕 | 探花视频在线看视频 | 青娱乐在线免费视频 | 中文字幕一二三四区 | 性感美女香蕉视频 | 又粗又硬又大又爽免费视频播放 | 中文字幕在线有码高清视频 | 亚洲成a人片在线观看88 | 香蕉久久a毛片 | 天天爱夜夜操 | 午夜 福利 视频 | 色欧美视频| 日本xxxxxx片免费播放18 | 亚洲欧洲国产精品你懂的 | 午夜视频在线看 | 中文学幕专区 | 欧美怡红院免费的全部视频 | 日韩欧美国产综合 | 欧洲成品大片在线播放 | 在线视频久 | 日日添日日摸 | 青娱乐色 | 日韩 亚洲 中文 图片 小说 | 日本高清视频免费观看 | 欧美性群另类大交人妖 | 欧美一级黄色影片 | 日本高清在线观看视频www | 色一情一乱一乱91av | 亚洲国产精品综合欧美 | 青娱乐最新视频 | 亚洲欧洲中文 | 欧洲精品视频在线观看 |