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 D6FE39DCB8A for ; Fri, 2 Dec 2005 06:16:01 -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 28196-05 for ; Fri, 2 Dec 2005 06:15:57 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 8891E9DCB0D for ; Fri, 2 Dec 2005 06:15:58 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id jB2AFvEw033693 for ; Fri, 2 Dec 2005 10:15:57 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id jB2AEAQ1032964 for pgsql-odbc@postgresql.org; Fri, 2 Dec 2005 10:14:10 GMT (envelope-from news) From: "Andrus" X-Newsgroups: pgsql.interfaces.odbc Subject: Re: Application crash after error - please help Date: Fri, 2 Dec 2005 12:14:02 +0200 Organization: Hub.Org Networking Services Lines: 77 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-Priority: 3 X-MSMail-Priority: Normal 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=-1.44 required=5 tests=[ALL_TRUSTED=-1.44] X-Spam-Score: -1.44 X-Spam-Level: X-Archive-Number: 200512/12 X-Sequence-Number: 6491 > I investigate it a little bit more and I go to the end of my > knolwdge. I hope someone on the list could help. > > Description: > You insert data with data at exec. It mean you call: > 1) SQLExecDirect with ? as parameters needed (3 of them) > 2) SQLParamData > 3) SQLPutData (only for text column) > 4) SQLParamData - which execute the query but fail and return SQL_ERROR > 5) SQLCancel - this is point of the problem. I don't know if it may > destroy Binding Parameters at all > > 6) SQLExecDirect without parameters needed - but ODBC driver execpt > 3 parameters becouse you didn't call SQLFreeStmt (SQL_DROP or > SQL_ - I forget the name which frees only binding params) > ODBC driver doesn't investigate number od parameters from statement. > Maybe this is point of problem? > 7) SQLParamData - go throught well > - your application failed. The point of failure isn't exactly in ODBC > driver but it correspond with SQLPutData is needed. Here are steps to reproduce: 1. Unpack www.eetasoft.ee/postgresrepro.zip (5 MB) (link valid at least one week) 2. Edit sqltest.prg to change password for connection string instead of aaaa, user name instead of admin and possibly other parameters. 3. Run the main.exe. Observed result: Fatal error: exception code C0000005 Expected result: message Program flow does not reach to this point. Environment: 1. Postgres 8.1 on Windows XP SP2. cluster locale is Estonian (occurs with other locales also). Database (sample code uses pre-installed postgres database) encoding is UTF8 2. Client in Windows XP SP2 (occurs with Win 98 client also), Unicode ODBC driver vers. 8.1.1. (occurs with ANSI driver also) 3. Client application is created using Microsoft Visual FoxPro 9 SP1beta (occurs in VFP vers 7 also) 4. Client windows locale is Estonian (occurs with other windows locales also). You may remove Ü character from sqltest.prg source code to run it in other locales and encodings. Notes: 1. Occurs only if SQLParamData returns SQL_ERROR. If not error is returned, problem does not occur. 2. Occurs only if table contains text type field. If there are only char or varchars fields, problem does not occur. > I'm not sure if it's problem of psqlODBC driver. Could someone more > experienced help? Visual FoxPro is closed source. Microsoft does not support Postgres ODBC driver. Since we have large amout of VFP code, we cannot change to other client at this moment. So only hope is it make some changes to ODBC driver code. I don't have C compiler and enough knowledge to compile odbc driver and investigate this issue. Should I add this issue to bug tracker ? Andrus.