简要咨询咨询QQ网站导航网站搜索手机站点联系我们设为首页加入收藏 

怎样获知数据库的连接属性?

来源:易贤网   阅读:844 次  日期:2014-08-09 16:20:25

温馨提示:易贤网小编为您整理了“怎样获知数据库的连接属性?”,方便广大网友查阅!

<%@ Language=VBScript %>

<%

Option Explicit

dim objCNN

dim intCTProps

dim item

dim vbCRLF

vbCRLF = chr(10)

Response.Write "<html><head></head><body>" & vbCRLF

Response.Write "<p><h3>春风精彩之查看数据库属性</h3></p>" & vbCRLF

Response.Write vbCRLF

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

objCNN.Open "DSN=VicTest"

Response.Write "<table border=1><tr><td width='10%'>>编号</td>" & vbCRLF

Response.Write "<td width='70%'>>Name</td><td width='20%'>>值</td></tr>" & vbCRLF

intCTProps = 0

for each item in objCNN.Properties

intCTProps = intCTProps + 1

Response.Write "<tr><td>" & intCTProps & "</td>" & vbCRLF

Response.Write "<td>" & item.name & "</td>" & vbCRLF

Response.Write "<td>" & item.value & "</td></tr>" & vbCRLF

next

Response.Write "</table>" & vbCRLF

Response.Write vbCRLF

Response.Write "</body></html>" & vbCRLF

set objCNN = Nothing

set intCTProps = nothing

set item = nothing

set vbCRLF = nothing

%>

更多信息请查看IT技术专栏

更多信息请查看网络编程
点此处就本文及相关问题在本站进行非正式的简要咨询(便捷快速)】     【点此处查询各地各类考试咨询QQ号码及交流群
上一篇:如何阻止别人非法链接你网站的图片?
下一篇:如何按时间显示最新标志
易贤网手机网站地址:怎样获知数据库的连接属性?
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!