Overview
Features
Download
Documentation
Community
Add-Ons & Services

Poco ODBC Connection String

Please post support and help requests here.

Re: Re: Re: Poco ODBC Connection String

Postby alex » 21 May 2007, 16:55

> > Well things got better, but the program just hangs. Not sure why, or is it my connection string or what not. But in the debugger, it never steps pass that line. I will try and step into it and see what it is doing tonight but I am completely lost at this point.

I did not try SQLServer from Linux yet, but It has just occurred to me that you are not specifying driver in your connection string, so there's no way for ODBC to figure out which driver you want.
alex
 
Posts: 1158
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Poco ODBC Connection String

Postby electic » 21 May 2007, 22:13

I will give it a shot, I am researching conenction strings right now. I did try my DSN which states the driver in there so my string was:

Session *dbConnection = new Session(ODBC::Connector().createSession("DSN=Test;UID=sa;PWD=xx"));

I am using UnixODBC and the driver to connect to SQLServer is FreeTDS.
electic
 
Posts: 48
Joined: 30 Jan 2007, 20:28

Re: Re: Poco ODBC Connection String

Postby alex » 23 May 2007, 19:49

> I am using UnixODBC and the driver to connect to SQLServer is FreeTDS.

I can connect to SQLServer running on a Win XP 64 box from Ubuntu 7.04 machine using unixODBC with the following connect string:

Code: Select all

"Driver=FreeTDS;UID=test;PWD=test;Database=test;Server=server_address.domain.com;Port=1433;"


Obviously, you'll want to replace "server_address.domain.com" with your own address.

A word of warning - FreeTDS does not appear to be very cooperative - tests do not pass.
PostgreSQL tests on Linux pass flawlessly after the recent fix (SF patch #1724388).

Also, I recommend using full connection string in your code rather than relying on DNS in odbc.ini, since unixODBC manager does not seem to report them properly (at least not with code that I am using to detect them). I will look into this issue for the next release.

Alex
alex
 
Posts: 1158
Joined: 11 Jul 2006, 16:27
Location: United_States

Previous

Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests