建站必读
网站建设知识
网站推广研究
网络营销与策划
网站案例评析
网络安全知识
ASP技术
PHP技术
JSP技术
.NET技术
当前位置:
首页
->
建站必读
->
ASP技术
怎样把数据库结构显示出来的源代码
通过以上的代码即可显示表的结构,字段类型,长度,自动编号,主健。如果你仔细研究后就可以发现如何远程改变数据库的结构了,祝你好运!
要查看此演示,需要你建立一个数据源,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 = "Va
本站关键词:
|石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务||石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|厚街镇 沙田镇 长安镇| 寮步镇 大岭山 大朗諀 黄江镇 樟木头 凤岗諀 塘厦镇 谢岗镇 清溪諀常平镇 桥头镇 横沥镇|东坑镇 企石镇 石排镇|茶山镇 莞城 东城|万江 南城|东莞网络服务|
域名注册
|
虚拟主机
|
网站建设
|
网站推广
| 广告设计
|
帮助中心
|
软件中心
|
关于腾达
东莞市腾达信息工程有限公司 本站网络实名: 东莞网站建设
地址:东莞市新城市中心区第一国际B座610 邮编:523007
电话:0769-22026071 22026072 传真:0769-22026076
24小时服务热线:13712032014
© 2002~2005 腾达网络 版权所有
粤ICP备 05018777号