How to check driver version from within an application ?

Lists: pgsql-odbc
From: Andreas <maps(dot)on(at)gmx(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: How to check driver version from within an application ?
Date: 2009-07-29 15:10:30
Message-ID: 4A706666.7050309@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

Hi,

how can I check actully used driver version from within an application?
I develop an application and I'd like to know I can read out the odbc
version to write into a log in case of errors.

Is there something like "SELECT ODBCVersion()"?
Probaply not.
How could I do it then?

Client application is MS Access on Windows XP.


From: Andrei Kovalevski <andyk(at)commandprompt(dot)com>
To: Andreas <maps(dot)on(at)gmx(dot)net>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: How to check driver version from within an application ?
Date: 2009-07-29 17:52:34
Message-ID: 4A708C62.8030506@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

Hi Andreas,

ODBC is a client side middle-layer interface. You can't determine any
ODBC-related property with SQL query. There are special functions which
client application can call to get info about ODBC driver, such as:
SQLDrivers, SQLGetInfo, etc...

You can start from this reference:
http://msdn.microsoft.com/en-us/library/ms714562(VS.85).aspx

Andreas wrote:
> Hi,
>
> how can I check actully used driver version from within an application?
> I develop an application and I'd like to know I can read out the odbc
> version to write into a log in case of errors.
>
> Is there something like "SELECT ODBCVersion()"?
> Probaply not.
> How could I do it then?
>
> Client application is MS Access on Windows XP.
>
>

--
Andrei Kovalevski
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: PL/php, ODBCng - http://www.commandprompt.com/