LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-02-2003, 03:41 AM   #1
playroll
LQ Newbie
 
Registered: Mar 2003
Location: Netherlands
Distribution: Slackware
Posts: 7

Rep: Reputation: 0
Question PostgreSQL ODBC with Windows


I try to set up an ODBC-connection from my Windows-computer to the Linux-computer, where PostgreSQL runs on.

I do this using the CDatabase class:
CDatabase db;
db.OpenEx(connstr);

When I fill in all the information, I still get the window "Select Datasource". When I select it, everything runs ok.

But when I connect to the server using pgAdminII, it connects to the server without any problems; it even hasn't set up a DSN.

When I use the connection string displayed in pgAdminII like this:
CDatabase db;
db.OpenEx("Provider=MSDASQL.1;Extended Properties=\"DRIVER={PostgreSQL};DATABASE=template1;SERVER=10.0.0.153;PORT=5432;UID=postgres;PWD=*** *****;ReadOnly=0;Protocol=6.4;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemTables=0;Conn Settings=;Fetch=100;Socket=4096;UnknownSizes=0;MaxVarcharSize=254;MaxLongVarcharSize=65536;Debug=0;C ommLog=0;Optimizer=1;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=1;BoolsAsCha r=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;LFConversion=1;UpdatableCursors=1;DisallowP remature=0;TrueIsMinus1=0;BI=0\"")

I still get the window where I need to select the DSN. Does anybody know how I can connect to the server without setting up or selecting a DSN first?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
is it possible to use a Windows ODBC driver with unixODBC? eantoranz Linux - Software 1 07-28-2011 02:55 PM
MySQL ODBC Driver problem (with MS Windows) gd2shoe Linux - Software 4 11-14-2005 01:50 PM
access Windows ODBC from Linux PHP Psykoral Linux - Software 2 12-15-2003 07:32 AM
postgresql -odbc & postgresql-jdbc installation kjsubbu Linux - Software 0 06-19-2003 02:50 AM
Postgresql ODBC driver for windows hubergeek Linux - Software 1 04-10-2002 04:36 PM


All times are GMT -5. The time now is 07:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration