Something like SQLGetInfo with vbscript for ODBC?
am 12.02.2005 18:53:44 von Florian
Hi,
I was wondering if there is a way to get details about a current ODBC
database connection.
We have some pages that connect to a ODBC data source via a DSN name
(ASP + VBScript) but need to know whether the database we are talking to
is MSSQL, MySQL, Oracle etc..
In C++ I am using SQLGetInfo() to get that information, but I have no
idea how to do that with VBScript. I just googled for 30 min but for
some reason it doesn't seem to be my lucky night.
Currently we are hardcoding that information into an INC file, but
getting this type of info during runtime would be much better.
We are using something like
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open "DSN=MyDSN;UID=user;PWD=haha"
Any suggestions are quite welcome ...
Thanks.
Re: Something like SQLGetInfo with vbscript for ODBC?
am 14.02.2005 16:52:11 von Mark Schupp
For Each i In dbConn.Properties
If LCase(i.name)="dbms name" Then
strName=LCase(Trim(i.value)) Exit For
End If
Next
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Florian" wrote in message
news:1108230824.7eae3b2a9f5bc1a5a6120d38bc373a66@teranews...
> Hi,
>
> I was wondering if there is a way to get details about a current ODBC
> database connection.
>
> We have some pages that connect to a ODBC data source via a DSN name
> (ASP + VBScript) but need to know whether the database we are talking to
> is MSSQL, MySQL, Oracle etc..
>
> In C++ I am using SQLGetInfo() to get that information, but I have no
> idea how to do that with VBScript. I just googled for 30 min but for
> some reason it doesn't seem to be my lucky night.
>
> Currently we are hardcoding that information into an INC file, but
> getting this type of info during runtime would be much better.
>
> We are using something like
>
> Set Connection = Server.CreateObject("ADODB.Connection")
> Connection.Open "DSN=MyDSN;UID=user;PWD=haha"
>
>
> Any suggestions are quite welcome ...
>
> Thanks.