From: Richard Broersma Jr <rabroersma@yahoo.com>
To: pgsql-odbc@postgresql.org, Finn Lassen <dcio@AxiomInt.com>
Subject: Re: Need help with Visual Basic 6 and PostgreSQL
Date: Wed, 21 Nov 2007 19:17:36 -0800 (PST)
Message-ID: <523506.48216.qm@web31803.mail.mud.yahoo.com> (raw)
In-Reply-To: <4744EB49.6050305@AxiomInt.com>
--- On Wed, 11/21/07, Finn Lassen <dcio@AxiomInt.com> wrote:
> It now crashes at the .Update statement.
> Any suggestions on how proceed?
> Do I have to configure the PostgreSQL ANSI driver somehow?
I would look at your PostgreSQL logs to see the exact crashing update statement that VB is sending to PostgreSQL to process (you may need to first turn on query logging in your postgresql.conf file and then restart your PostgreSQL service). Next I would try to manually run the listed update query in postgres' command line editor psql to see the error message that it generates. This will probably a very clear indication of what is wrong in your VB generated record-set update.
Also, give the how-to example for using ADO + ODBC + PG a try that comes with your ODBC installation help documentation?
it is found in this path on my computer:
C:\Program Files\PostgreSQL\8.2\doc\psqlODBC\howto-vb.html
Also, you may consider using the PostgreSQL Unicode ODBC driver over the ANSI driver since it supports a larger array of character sets.
I wish I could be of more help, but I've never really grown accustom to using Records sets to update or delete records. I've always manually crafted my own SQL statements that I've passed to the back-end server.
Also at the risk of getting my head bitten off by someone more knowledgeable that disagrees :-), it is a good practice to know your database schema design well enough to know the names of your tables and columns. It is also good practice to directly call out those column names in your code rather than simply guessing based on the field types.
Regards,
Richard Broersma Jr.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: rabroersma@yahoo.com, dcio@AxiomInt.com
Subject: Re: Need help with Visual Basic 6 and PostgreSQL
In-Reply-To: <523506.48216.qm@web31803.mail.mud.yahoo.com>
References: <4744EB49.6050305@AxiomInt.com> <523506.48216.qm@web31803.mail.mud.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox