Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id D1FF29FB73E for ; Thu, 15 Mar 2007 19:09:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 24052-02 for ; Thu, 15 Mar 2007 19:09:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from rrmailscan3.safenetbox.biz (unknown [203.25.40.75]) by postgresql.org (Postfix) with ESMTP id A78499FB864 for ; Thu, 15 Mar 2007 19:09:53 -0300 (ADT) Received: from rrmailscan3.safenetbox.biz (rrmailscan3.safenetbox.biz [127.0.0.1]) by rrmailscan3.safenetbox.biz (Postfix) with ESMTP id 423191D48453 for ; Fri, 16 Mar 2007 09:09:51 +1100 (EST) Received: from [127.0.0.1] (online4-new.lnk.telstra.net [139.130.169.227]) (Authenticated sender: remote) by rrmailscan3.safenetbox.biz (Postfix) with ESMTP id 461801D48466 for ; Fri, 16 Mar 2007 09:09:50 +1100 (EST) Message-ID: <45F9C41E.7080302@autoledgers.com.au> Date: Fri, 16 Mar 2007 07:09:34 +0900 From: Paul Lambert User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: Access violation - probably not the fault of Postgres References: <45EF749F.5030107@autoledgers.com.au> <45F04B57.9010401@yucaipaco.com> <45F08759.7010207@autoledgers.com.au> <45F4A712.8090105@autoledgers.com.au> <45F5BE06.8010102@yucaipaco.com> In-Reply-To: <45F5BE06.8010102@yucaipaco.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/80 X-Sequence-Number: 8758 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