当前位置: 代码网 > it编程>编程语言>其他编程 > 怎样获知数据库的连接属性?

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

2024年05月15日 其他编程 我要评论
<%@ language=vbscript %><% option explicit dim objcnn dim intctprops dim item dim vbcrlf v

<%@ 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

%>

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com