Re: Delphi7, ADO, ODBC and PostgreSQL connection problems:

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: Mikhail Umorin <mikeumo(at)onebox(dot)com>
Cc: noelrv(at)nipahut(dot)org, rncombs(at)covad(dot)net, pgsql-odbc(at)postgresql(dot)org
Subject: Re: Delphi7, ADO, ODBC and PostgreSQL connection problems:
Date: 2003-09-18 23:53:42
Message-ID: 3F6A4586.6101F0AE@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Mikhail Umorin wrote:
>
> Thanks everyone for helping me! Especially, Hiroshi, Noel and Richard!
>
> Following Noel's suggestion I installed pgAdmin (II, 1.6.0). It connected fine and I could see values in the tables without any other changes to client and server PCs. So, I decided to try the same connection string that pgAdmin uses (I could conveniently cut and paste it from pgAdmin window: thanks, pgAdmin!) - and it worked! The string was:
> Provider=MSDASQL.1;Extended Properties="DRIVER={PostgreSQL};DATABASE=lara;
> SERVER=192.168.1.2;PORT=5432;UID=lara;PWD=********;
> ReadOnly=0;Protocol=6.4;FakeOidIndex=0;ShowOidColumn=0;
> RowVersioning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;
> Socket=4096;UnknownSizes=0;MaxVarcharSize=254;
> MaxLongVarcharSize=65536;Debug=0;CommLog=0;Optimizer=1;Ksqo=1;
> UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;
> BoolsAsChar=1;Parse=0;CancelAsFreeStmt=0;
> ExtraSysTablePrefixes=dd_;LFConversion=1;UpdatableCursors=1;
> DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;
> UseServerSidePrepare=0"
>
> I think the problem was that when I specified a file DSN or
> would build a connection string using Delphi's tools it was
> not handled properly or constructed properly by Delphi's
> TADOConnection object. So, what OLE DB driver for ODBC would
> get was partially illegal; so, the driver would connect but
> would not communicate beyond the handshake.
>
> Now, the driver's log contains no errors (so, there was
> something serious there, Hiroshi).

I'm still suspecting that the *use declare/fetch option*
is turned on. Could you try to add "UseDeclareFetch=0" option
to your connection string ?

regards,
Hiroshi Inoue
http://www.geocities.jp/inocchichichi/psqlodbc/

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Noel R. Villamor 2003-09-19 00:07:55 Re: Delphi7, ADO, ODBC and PostgreSQL connection problems: SUCCESS!
Previous Message Hiroshi Inoue 2003-09-18 23:46:13 Re: [HACKERS] Killing the backend to cancel a long waiting query