HighTechTalks DotNet Forums  

odbc version info hard to find

Dotnet Framework (ODBC.net) microsoft.public.dotnet.framework.odbcnet


Discuss odbc version info hard to find in the Dotnet Framework (ODBC.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Joe Stateson
 
Posts: n/a

Default odbc version info hard to find - 11-05-2007 , 03:13 PM






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.ConnectionS trings["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
================================================== ====================


Reply With Quote
  #2  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: odbc version info hard to find - 11-06-2007 , 03:00 AM






In comp.databases.postgresql Joe Stateson <jstateson (AT) swri (DOT) edu> wrote:
Quote:
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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.