X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id BFC9BD1B509 for ; Thu, 18 Sep 2003 02:53:14 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 42785-10 for ; Wed, 17 Sep 2003 23:52:46 -0300 (ADT) Received: from smtp.covadmail.net (mx04.covadmail.net [63.65.120.64]) by svr1.postgresql.org (Postfix) with SMTP id 4E9D0D1B4E1 for ; Wed, 17 Sep 2003 23:52:42 -0300 (ADT) Received: (covad.net 12168 invoked from network); 18 Sep 2003 02:52:42 -0000 Received: from unknown (HELO covad.net) (rncombs@68.165.40.160) by sun-qmail14 with SMTP; 18 Sep 2003 02:52:42 -0000 Message-ID: <3F691DE8.70703@covad.net> Date: Wed, 17 Sep 2003 21:52:24 -0500 From: Richard Combs User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: Delphi7, ADO, ODBC and PostgreSQL connection problems Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/70 X-Sequence-Number: 3268 I have been able to successfully connect to PostgreSQL using D7 and ADO. Environment: D7 on W2K workstation MDAC v2.8 PostgreSQL ODBC driver v7.03.01.00 PostgeSQL v7.3.4 on SuSE Linux 8.2 (Compiled with odbc switch, odbc.sql applied to template1 before creating new databse) With ODBC Create system DSN pointing to databse on server (use standard driver) In D7 New project Add ADOConnection Build Connection String (using the system DSN you just created) - Mine looks like this: Provider=MSDASQL.1;Password=sysdba;Persist Security Info=True; User ID=postgres;Data Source=Manpower-pg; Extended Properties="DSN=Manpower-pg;DATABASE=manpower; SERVER=192.168.0.3;PORT=5432; UID=postgres;PWD=sysdba;ReadOnly=0; Protocol=6.4;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=1; ShowSystemTables=0;ConnSettings=;Fetch=100; Socket=4096;UnknownSizes=2;MaxVarcharSize=254; MaxLongVarcharSize=32764;Debug=0;CommLog=0; Optimizer=1;Ksqo=1;UseDeclareFetch=1; TextAsLongVarchar=1;UnknownsAsLongVarchar=1; BoolsAsChar=1;Parse=1;CancelAsFreeStmt=0; ExtraSysTablePrefixes=dd_;;LFConversion=1; UpdatableCursors=1;DisallowPremature=1;TrueIsMinus1=0; BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=1" Test the connection after building it - it should test ok Set the connection to active - you should have a valid connection Add some other stuff to the form to verify you are getting data In my case, I added an ADOTable, DataSource, and DataGrid (grid points to source, source to table, table to connection) You can view the full table contents. Some other things to check: 1. Check your pg_hba.conf - are you allowing access to your client machine? 2. Check your postgresql.conf - do you allow tcpip_sockets, have you changed your default port from 5432? 3. Do you have proper rights to the database - are you logging in with the same user name and password as you used to create the database? You can always try using dbExpress using the openODBC driver available on sourceforge. However, I have had problems getting all rows of a table to return. Only the first row shows up. Checking logs and packet sniffing reveals PostgreSQL is returning all rows. IMHO dbExpress is not yet ready for primetime - it is too quirky. Too bad as I would like to use it in place of ADO. HTH