加入收藏 | 设为首页 | 会员中心 | 我要投稿 银川站长网 (https://www.0951zz.com/)- 云通信、基础存储、云上网络、机器学习、视觉智能!
当前位置: 首页 > 站长学院 > Asp教程 > 正文

使用 Asp我们可以取得访问数据库所需的信息

发布时间:2023-10-30 12:34:56 所属栏目:Asp教程 来源:
导读:asp获取数据库的连接属性的方法:Option Explicitdim objCNNdim intCTPropsdim itemdim vbCRLFvbCRLF = chr(10)Response.Write "" & vbCRLFResponse.Write "春风精彩之查看数据库属性" & vbCRLFResponse.Write vbCRL

asp获取数据库的连接属性的方法:

Option Explicit

dim objCNN

dim intCTProps

dim item

dim vbCRLF

vbCRLF = chr(10)

Response.Write "" & vbCRLF

Response.Write "

春风精彩之查看数据库属性" & vbCRLF

Response.Write vbCRLF

set objCNN = Server.CreateObject("ADODB.connection")

objCNN.Open "DSN=VicTest"

Response.Write ">编号" & vbCRLF

Response.Write ">Name>值" & vbCRLF

intCTProps = 0

for each item in objCNN.Properties

intCTProps = intCTProps + 1

Response.Write "" & intCTProps & "" & vbCRLF

Response.Write "" & item.name & "" & vbCRLF

Response.Write "" & item.value & "" & vbCRLF

next

Response.Write "" & vbCRLF

Response.Write vbCRLF

Response.Write "" & vbCRLF

set objCNN = Nothing

set intCTProps = nothing

set item = nothing

set vbCRLF = nothing

%>

(编辑:银川站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章