Thread: PgODBC + Borland C++ Builder problems

PgODBC + Borland C++ Builder problems

From
"Geoffrey C. Speicher"
Date:
I have been using BC++ Builder for a few weeks now to build an interface
to a PostgreSQL database via the pgODBC Win32 driver, and there seems to
be some incompatibility between the two.

Particularly, BCB and programs created with it will frequently result in
an access violation in KERNEL32.DLL.  The BCB user community does not
report such behavior with other ODBC drivers, but there was mention of
something similar with an older "buggy" driver for MS-SQL or something
along those lines.

Example:
 1. Open data source + table in BCB-built program 2. Open dialog containing a form and data controls for the data
source3. Immediately jump to last record in table 4. Witness program crash (access violation in kernel32.dll)    [This
happensafter a pause of a few seconds, during which the     program displays the "waiting for SQL" mouse pointer.]
 

However, if between steps 2 and 3 you browse though the records in the
table, then jumping to the end does not crash the program.  Further, there
are some tables for which the crash never happens, but I cannot find any
pattern for determining whether or not a particular table will cause it.

The problem also affects actions such as filling a combo box with the
contents of a table.  Again, for some tables, the combo box will fill just
fine, and for others it will crash.

Any ideas?

Geoff



Re: [INTERFACES] PgODBC + Borland C++ Builder problems

From
"Geoffrey C. Speicher"
Date:
On Sun, 16 May 1999, Geoffrey C. Speicher wrote:

> I have been using BC++ Builder for a few weeks now to build an interface
> to a PostgreSQL database via the pgODBC Win32 driver, and there seems to
> be some incompatibility between the two.

Hey, nevermind---it's fixed.  Checking the "Recognize Unique Indexes" box
in the advanced ODBC driver options fixed it.  Just for the record, and
maybe the PsqlODBC FAQ should be updated to reflect this, my settings are:

x Disable Genetic Optimizer          o CommLog
x KSQO (Keyset Query Optimization)   o ReadOnly
x Recognize Unique Indexes           o Parse Statements
o Use Declare/Fetch                  o Cancel as FreeStmt

Unknown Sizes: Longest

x Text as LongVarChar    o Unknowns as LongVarChar    x Bools as Char

Everything else as default (as is much of the above anyway).  Works like a
charm with Borland C++ Builder 4.0 (which is really nice, BTW).

Geoff



ODBC with VISUAL BASIC applications to access POSTGRESQL db on LINUX??

From
"Justin Long"
Date:
Ok, I'm confused... I've read most of the messages in my archives that deal
with PGSQL, ODBC... I would like to develop some applications using VB6 to
access PGSQL databases on Linux remotely over the Internet. Can someone
point me to an ODBC driver that would enable this? Should I use P. Harvey's
driver, or something else... what is postODBC? iODBC? I don't find any
references on the PGSQL web site and can't find other web sites that would
have these. Suggestions welcome!

Thanks,
Justin Long


Never retreat. Never surrender. Never cut a deal with a dragon.
_______________________________________________________________
Justin Long                   CIO / Site Editor
616 Station Square Ct         Network for Strategic Missions
Chesapeake, VA 23320          977 Centerville Trnpk CSB 317
JustinLong@xc.org             Va Beach, VA 23463
Check out our site at:        http://www.strategicnetwork.org