all groups > dotnet odbc.net > november 2007 >
You're in the

dotnet odbc.net

group:

odbc version info hard to find


odbc version info hard to find Joe Stateson
11/5/2007 3:13:58 PM
dotnet odbc.net:
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:

OdbcConnection oc = new
OdbcConnection(WebConfigurationManager.ConnectionStrings["acqlibdbConnectionString"].ToString());
oc.Open();
string strVersion = oc.ServerVersion; // 8.1.8 is shown for our Postgre
acqlib


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 then tried enumerating the drivers starting with "SQL Server" and looping
thru each one ...

iResult = ODBC_GetDSNs.SQLDataSources(
lhEnv, SQL_FETCH_NEXT,
sDSNItem, 1024,
ref iDSNLen, sDRVItem,
1024, ref iDRVLen)l

The driver for PostgreSQLAcqlib eventually shows up as "PostgreSQL ANSI" but
there is no version number in the sDRVItem aggregate. I know I am using
"PostgreSQL ANSI" and I would like to directly find out what the version #
is and it seems this is not easily available. I did spot the name
"psqlodbc.dll" in my "oc" connection, but the actual name of the dll is
"psqlodbc30a.dll"


--
======================================================================
Joseph "Beemer Biker" Stateson
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
======================================================================
Re: odbc version info hard to find Laurenz Albe
11/6/2007 9:00:21 AM
[quoted text, click to view]

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,
AddThis Social Bookmark Button