Overview
Features
Download
Documentation
Community
Add-Ons & Services

Problem running ODBCPostgreSQLTest

Please post support and help requests here.

Problem running ODBCPostgreSQLTest

Postby sebastianloesch » 21 Feb 2009, 18:01

Hello everybody,

I try to get the ODBCPostgreSQLTest running, but the DSN cannot be found.

That's what I did:

1) setup a postgres server, configured access to all databases for all users
2) installed unixODBC
3) setup a driver named PostgreSQL
4) setup a system DSN named PocoDataPgSQLTest

When I run the test, the driver is found, but absolutely no DSN (I modified the source to print out every DSN).
What do I have to do to make the DSN accessible to poco?

Greetings,
Sebastian
sebastianloesch
 
Posts: 3
Joined: 21 Feb 2009, 17:44
Location: Germany

Re: Problem running ODBCPostgreSQLTest

Postby alex » 21 Feb 2009, 18:48

What version of Poco are you running?
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Problem running ODBCPostgreSQLTest

Postby sebastianloesch » 22 Feb 2009, 13:31

Poco: Release 1.3.3p1
unixODBC: 2.2.12
PostgreSQL: 8.2.5
sebastianloesch
 
Posts: 3
Joined: 21 Feb 2009, 17:44
Location: Germany

Re: Problem running ODBCPostgreSQLTest

Postby alex » 22 Feb 2009, 14:16

Does isql see your DSN? Some unixODBC versions were tricky in where they choose to pick the odbc.ini (/etc/odbc.ini, ~/.odbc.ini, ...)
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Problem running ODBCPostgreSQLTest

Postby sebastianloesch » 22 Feb 2009, 14:31

Yes, I can connect with isql using the DSN.

And I have put DSN entries in all known locations (/etc/odbc.ini, /usr/local/etc/odbc.ini, ~/.odbc.ini),
but without success.
sebastianloesch
 
Posts: 3
Joined: 21 Feb 2009, 17:44
Location: Germany

Re: Problem running ODBCPostgreSQLTest

Postby alex » 22 Feb 2009, 15:10

sebastianloesch wrote:When I run the test, the driver is found, but absolutely no DSN (I modified the source to print out every DSN).


Data sources are whatever the SQLDataSources ODBC API call (called from Poco::Data::Utility::dataSources) returns.

sebastianloesch wrote:What do I have to do to make the DSN accessible to poco?


I'm not sure, but I'd try two things:

1) See which odbc.ini unixODBC reads (check the process' user's home for .odbc.ini file) for your process/user and what does SQLDataSources call return.

2) If you can't figure out what's wrong, try connecting without DSN (for connection string example see trunk code : http://poco.svn.sourceforge.net/viewvc/ ... iew=markup )

I have successfully ran tests on Ubuntu using unixODBC against PostgreSQL for the release you are using, so there's likely something about your particular setup that is causing this.
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest