![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I wish to put the version numbers of various drivers in an about box for my web app. I can easily find the sql server version from a connection: [...] However, there is no version for the odbc driver. I was expecting to see 8.02.0400 somewhere so I can see what version the Microsoft IIS has installed. |
#3
| |||
| |||
|
|
In comp.databases.postgresql Joe Stateson <jstateson (AT) swri (DOT) edu> wrote: I wish to put the version numbers of various drivers in an about box for my web app. I can easily find the sql server version from a connection: [...] However, there is no version for the odbc driver. I was expecting to see 8.02.0400 somewhere so I can see what version the Microsoft IIS has installed. I don't know about ODBC, but browsing the source of psqlODBC I see that the driver version should be returned when you call SQLGetInfo with SQL_DRIVER_VER (= 7) as second argument. Does that help? Yours, Laurenz Albe |
#4
| |||
| |||
|
|
Joe Stateson schrieb: "Laurenz Albe" <invite (AT) spam (DOT) to.invalid> wrote in message news:1194339619.839843 (AT) proxy (DOT) dienste.wien.at... In comp.databases.postgresql Joe Stateson <jstateson (AT) swri (DOT) edu> wrote: I wish to put the version numbers of various drivers in an about box for my web app. I can easily find the sql server version from a connection: [...] However, there is no version for the odbc driver. I was expecting to see 8.02.0400 somewhere so I can see what version the Microsoft IIS has installed. I don't know about ODBC, but browsing the source of psqlODBC I see that the driver version should be returned when you call SQLGetInfo with SQL_DRIVER_VER (= 7) as second argument. Does that help? Yours, Laurenz Albe Thanks Laurenz, but it only returned the name of the driver. What version are you using? This call returns "08.02.0402" on my machine: SQLGetInfo( &sqlRV, hDBC, SQL_DRIVER_VER, SQLPOINTER(pBuf), sizeof(pBuf), &nSize ) Rainer |
#5
| |||
| |||
|
|
Joe Stateson wrote: This code is not easy to write as I cannot include "sql.h" nor "sqlext.h" in my C# code and have to guess as how to code them. Mmh, couldn't you simple use Microsoft.Data.Odbc.OdbcConnection.GetInfo(), or is that method private? |
#6
| |||
| |||
|
|
I wish to put the version numbers of various drivers in an about box for my web app. I don't know about ODBC, but browsing the source of psqlODBC I see that the driver version should be returned when you call SQLGetInfo with SQL_DRIVER_VER (= 7) as second argument. Thanks Laurenz and Rainer. It turned out that my call to SQLGetInfo failed [...] So far I have been able to allocate an environment handle, then set the ODBC attribute to "200" and version to "3" then allocate a DBC handle and ask for the driver version. I am getting an error code at that point and when I get more time I will go back and debug it. |
#7
| |||
| |||
|
|
Joe Stateson <jstateson (AT) swri (DOT) edu> wrote: I wish to put the version numbers of various drivers in an about box for my web app. I don't know about ODBC, but browsing the source of psqlODBC I see that the driver version should be returned when you call SQLGetInfo with SQL_DRIVER_VER (= 7) as second argument. Thanks Laurenz and Rainer. It turned out that my call to SQLGetInfo failed [...] So far I have been able to allocate an environment handle, then set the ODBC attribute to "200" and version to "3" then allocate a DBC handle and ask for the driver version. I am getting an error code at that point and when I get more time I will go back and debug it. Ok, I tried it out myself, and I find that you must connect before you can retrieve the driver version with SQLGetInfo(). The documentation from Microsoft states that "All calls to SQLGetInfo require an open connection, except when the InfoType is SQL_ODBC_VER, which returns the version of the Driver Manager." Yours, Laurenz Albe |
![]() |
| Thread Tools | |
| Display Modes | |
| |