From: Paul Lambert <paul.lambert@autoledgers.com.au>
To: pgsql-odbc@postgresql.org
Subject: Re: Access violation - probably not the fault of Postgres
Date: Fri, 16 Mar 2007 07:09:34 +0900
Message-ID: <45F9C41E.7080302@autoledgers.com.au> (raw)
In-Reply-To: <45F5BE06.8010102@yucaipaco.com>
References: <45EF749F.5030107@autoledgers.com.au>
<45F04B57.9010401@yucaipaco.com>
<45F08759.7010207@autoledgers.com.au>
<45F4A712.8090105@autoledgers.com.au>
<45F5BE06.8010102@yucaipaco.com>
More on this whole story...
I've found that in some instances I was referencing table and fieldnames
with cased names, where all items in my db are lowercase. I changed that.
I also found that when checking for primary keys the program was
surrounding the data values with square brackets [] - a legacy from sql
server.
I also found that when passing strings to the database they weren't
enclosed in apostrophes. I.e. Joe Bloggs instead of 'Joe Bloggs'
I noted in some cases my program was trying to do an AddNew when the
record did in fact exist in the database, which I assume to be due to
the casing of field names in the primary key. However in those cases the
ODBC driver was receiving an error rather than crashing the program.
I don't know if any of these would have been the central problem, but I
changed them all to more appropriate behavior and the incidences of
crashes have somewhat dropped. Rather than crashing with every second or
third update it is now able to carry on for a couple of dozen or more
before it goes kaput....
Now I'm more intrigued.
I am in the process of converting the updates and inserts to executes on
the database object rather than using an intermediary recordset, so I'll
see if that changes anything - it'll let me get rid of a significant
block of code anyway.
P.
--
Paul Lambert
Database Administrator
AutoLedgers
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: paul.lambert@autoledgers.com.au
Subject: Re: Access violation - probably not the fault of Postgres
In-Reply-To: <45F9C41E.7080302@autoledgers.com.au>
References: <45EF749F.5030107@autoledgers.com.au> <45F04B57.9010401@yucaipaco.com> <45F08759.7010207@autoledgers.com.au> <45F4A712.8090105@autoledgers.com.au> <45F5BE06.8010102@yucaipaco.com> <45F9C41E.7080302@autoledgers.com.au>
* 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