pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrus <eetasoft@online.ee>
To: pgsql-odbc@postgresql.org
Subject: Re: Application crash after error - please help
Date: Fri, 2 Dec 2005 12:14:02 +0200
Message-ID: <dmp6ph$1050$1@news.hub.org> (raw)
References: <dmfhmq$7d8$1@news.hub.org>
	<20051128194725.GA28107@soptik.pzkagis.cz>
	<dmhku2$1ja8$1@news.hub.org>
	<20051129134743.GA32475@soptik.pzkagis.cz>
	<dmi0k3$hi5$1@news.hub.org>
	<20051202090530.GA20513@soptik.pzkagis.cz>

>  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. 





view thread (8+ messages)  latest in thread

Message-ID: <dmp6ph$1050$1@news.hub.org>
Permalink:  ../dmp6ph$1050$1@news.hub.org/
Also on:    postgresql.org/message-id/dmp6ph$1050$1@news.hub.org

 · 

reply

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: eetasoft@online.ee
  Subject: Re: Application crash after error - please help
  In-Reply-To: <dmp6ph$1050$1@news.hub.org>
  References: <dmfhmq$7d8$1@news.hub.org> <20051128194725.GA28107@soptik.pzkagis.cz> <dmhku2$1ja8$1@news.hub.org> <20051129134743.GA32475@soptik.pzkagis.cz> <dmi0k3$hi5$1@news.hub.org> <20051202090530.GA20513@soptik.pzkagis.cz> <dmp6ph$1050$1@news.hub.org>

* 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