[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

odbc version info hard to find

Beemer Biker

11/5/2007 9:14:00 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.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://TipsForTheComputingIm...
http://Research... Ask about my 99'R1100RT
======================================================================

1 Answer

Laurenz Albe

11/6/2007 9:00:00 AM

0

In comp.databases.postgresql Joe Stateson <jstateson@swri.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