Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 04-02-2003, 04:41 AM   #1
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;

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=;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?


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 03:55 PM
MySQL ODBC Driver problem (with MS Windows) gd2shoe Linux - Software 4 11-14-2005 02:50 PM
access Windows ODBC from Linux PHP Psykoral Linux - Software 2 12-15-2003 08:32 AM
postgresql -odbc & postgresql-jdbc installation kjsubbu Linux - Software 0 06-19-2003 03:50 AM
Postgresql ODBC driver for windows hubergeek Linux - Software 1 04-10-2002 05:36 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:34 PM.

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