CSDN博客

img cuixiping

在ASP中读取ADO、DBMS、OLEDB、Provider、ODBC Driver的版本

发表于2004/9/16 10:32:00  1286人阅读


Sub VersionX()

Dim cnn1
Dim strCnn
Dim strVersionInfo

' Open connection.
Set cnn1 = Server.CreateObject("ADODB.Connection")
strCnn = "driver={SQL Server};server=srv;" & _
"user id=sa;password=;database=Pubs;"
cnn1.Open strCnn

strVersionInfo = "ADO Version: " & cnn1.Version & vbCr & _
"DBMS Name: " & cnn1.Properties("DBMS Name") & vbCr & _
"DBMS Version: " & cnn1.Properties("DBMS Version") & vbCr & _
"OLE DB Version: " & cnn1.Properties("OLE DB Version") & vbCr & _
"Provider Name: " & cnn1.Properties("Provider Name") & vbCr & _
"Provider Version: " & cnn1.Properties("Provider Version") & vbCr & _
"Driver Name: " & cnn1.Properties("Driver Name") & vbCr & _
"Driver Version: " & cnn1.Properties("Driver Version") & vbCr & _
"Driver ODBC Version: " & cnn1.Properties("Driver ODBC Version")

Response.Write strVersionInfo

cnn1.Close

End Sub

Call VersionX()

0 0

相关博文

我的热门文章

img
取 消
img