MSDOTnet.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

odbc version info hard to find

 
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ODBC Dotnet
Author Message
Joe Stateson



Joined: 22 Aug 2007
Posts: 11

PostPosted: Mon Nov 05, 2007 8:13 pm    Post subject: odbc version info hard to find Reply with 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:

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
======================================================================

Archived from group: comp>databases>postgresql
Back to top
View user's profile Send private message
Laurenz Albe



Joined: 06 Nov 2007
Posts: 1

PostPosted: Tue Nov 06, 2007 2:00 pm    Post subject: Re: odbc version info hard to find Reply with quote

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

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
The driver doesn't support the version of ODBC behavior that Dear Techies, I do have small issue on connecting oracle server [odbc connection] from .net [MOSS 2007 webpart] This is the code snippet public string strConString = ODBC for using (OdbcCo

The driver doesn't support the version of ODBC behavior that Dear Techies, I do have small issue on connecting oracle server [odbc connection] from .net [MOSS 2007 webpart] This is the code snippet public string strConString = ODBC for using (OdbcCo

Cannot find system.data.odbc.dll???? I upgraded to VS 2003 which I thought should have installed the complete v1.1 framework BUT I cannot find I need to create a reference to it. Anyone have a suggestion about where I can get this file? TIA -- Bobby C. Proper reply ad

ODBC could not find MYSQL 3.51 driver Hi, I am having a problem with connecting to MySQL driver from ODBC. I can see from ODBC datasource that MySQL Driver is there and I can test successfully. But when I try to connect from ODBC, I received the error that MySQL ODBC Driver can not be foiund

ODBC.NET Hi, I downloaded ODBC.NET from Microsoft and installed on my machine. My C# code keeps failing to connect to a MySQL database, the error is: ERROR [IM002] Driver Manager] Data source name not found and no default driver specified Connecti
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ODBC Dotnet All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group