X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 52D3D9DCAB2 for ; Fri, 2 Dec 2005 12:52:46 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24666-01 for ; Fri, 2 Dec 2005 12:52:42 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id D3C979DD743 for ; Fri, 2 Dec 2005 12:52:41 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id A102533692; Fri, 2 Dec 2005 17:52:39 +0100 (MET) From: "Andrus" X-Newsgroups: pgsql.interfaces.odbc Subject: Re: Application crash after error - please help Date: Fri, 2 Dec 2005 18:51:26 +0200 Organization: Hub.Org Networking Services Lines: 43 Message-ID: References: <20051128194725.GA28107@soptik.pzkagis.cz> <20051129134743.GA32475@soptik.pzkagis.cz> <20051202090530.GA20513@soptik.pzkagis.cz> X-Complaints-To: usenet@news.hub.org X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Original To: pgsql-odbc@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/21 X-Sequence-Number: 6500 Ludek, > Main.exe doesn't use auth info prom sqltest.prg. I'm sorry. Modified repro code is available in same address (www.eetasoft.ee/postgresrepro.zip) This repro contains text type column. Fox mysql it should probably be replaced also. My co-worker tries to run it in mysql in weekend. > I don't know if the problem is in ODBC driver. But to fix this problem > imidiately in your app it's enough > if you add Calling SQLFreeStmt with SQL_DROP in the code when insert > fail. Thank you. This would be a good fix. Unfortunately it it difficult to implement in VFP. I don't use ODBC direct calls in my code. In repro code I issue APPEND FROM APPEND FROM DBF('testk') This causes VFP to generate ODBC calls automatically. I do'nt know is it possible to add ODBC SQLFreeStmt direct call after high-level VFP APPEND FROM command. More generally: I create form, bind it to Postgres server data. Users edit this form. During editing process VFP generates ODBC calls automatically. Trying to insert duplicate primary by end user or some other odbc error causes my appl crash shortly after that. My code is not involved in this process. Theoretically, I can determine odbc handle used by VFP and make direct ODBC dll calls from my application. I can add my code to editing events to fix something. However, I do'nt know the places where to add SQLFreeStmt calls and i'm not sure how to add such fixes in all situations which may occur during editing process. Andrus.