怎样获知数据库的连接属性?_编程10000问

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

%>

时间: 2024-11-03 05:07:05

怎样获知数据库的连接属性?_编程10000问的相关文章

如何实时获知多少人在线?_编程10000问

global.asa<script LANGUAGE="VBScript" RUNAT="Server"> Sub Application_OnStart      ' Sub Application_OnStart 是好在服务器每次启动的时候激活的方法.       Session.Timeout = 3 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:

如何获知所有的Cookie?_编程10000问

1.撼雪喷云之显示Cookie <TABLE BORDER="2">      <Thead>            <TH>Cookie名</TH>            <TH>Cookie值</TH>            <TH>删除Cookie</TH>      </Thead><%Dim Item       %>      <tr>   

如何分页显示数据库查询结果?_编程10000问

<% if Request.QueryString("PageNumber").count > 0 then <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> ' 指定页号的参数PageNumber.如果指定页号,则以指定页号为依据. PageNumber = Request.QueryString("PageNumber&quo

如何用数据库制作一个多用户版的计数器?_编程10000问

count.asp<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> ' 计数器的核心程序. <%Set conn = Server.CreateObject("ADODB.Connection")dbpath=server.MapPath("count.mdb")conn.open "driver={Microsof

为什么有的留言簿不需要数据库?_编程10000问

< html> < body> < form action="manage.asp" method="post"> < input type="text" size="10" name="username"> < input type="text" size="10" name="homepage&quo

如何用下拉列表显示数据库里的内容?_编程10000问

<%Dim objDC, objRS Set objDC = Server.CreateObject("ADODB.Connection")objDC.ConnectionTimeout = 15objDC.CommandTimeout = 30<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> ' 创建数据库连接 objDC.Open "

如何在ADSI中查询用户属性?_编程10000问

如何在ADSI中查询用户属性?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> <%Dim x On error resume next'Set x = GetObject("WinNT://kenfilszwin2k/allen")strLDAP="LDAP://kenfilszwin2k/CN=Allen He,OU=kenfils

如何获知文件最后的修改日期和时间?_编程10000问

<%Dim objCMFUDim strModified Set objCMFU = Server.CreateObject("CM_FileUtils.GetProperty")' 创建对象并赋给变量,并且GetProperty类是当前唯一可用的. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> strModified = objCMFU.L

如何获知文件被改动的情况?_编程10000问

Function File_GetLastModified( sFile ) Dim objFileObj, objFile  <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> Set objFileObj = CreateObject("Scripting.FileSystemObject")   If sFile = "" Th