Thread: Getting DSN settings via ODBC?

Getting DSN settings via ODBC?

From
"Jan-Peter Seifert"
Date:
Hello,

is it possible to get the DSN's psqlODBC specific settings (PROTOCOL, "Level of Rollback on errors" etc.) via ODBC
(information)functions? 

Thank you very much!

Best regards,

Peter


Re: Getting DSN settings via ODBC?

From
"Tsunakawa, Takayuki"
Date:
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Jan-Peter Seifert
> is it possible to get the DSN's psqlODBC specific settings (PROTOCOL, "Level
> of Rollback on errors" etc.) via ODBC (information) functions?

The only method seems to get completed connection string via OutConnectionString of SQLDriverConnect().

https://msdn.microsoft.com/en-us/library/ms715433(v=vs.85).aspx

When I specified "DSN=postgres" to InConnectionString, I got the following string in OutConnectionString.  A1 is the
protocoland level-of-rollback setting.
 


DSN=postgres;DATABASE=postgres;SERVER=localhost;PORT=5450;UID=tunakawa;PWD=;CA=d;A6=;A7=100;B0=255;B1=8190;BI=0;C2=dd_;CX=1c305088a;A1=7.4

Why do you want to know psqlODBC-specific settings in your program?

Regards
Takayuki Tsunakawa