Re: Application crash after error - please help

From: "Andrus" <eetasoft(at)online(dot)ee>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Application crash after error - please help
Date: 2005-12-02 10:14:02
Message-ID: dmp6ph$1050$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Andrus 2005-12-02 10:19:55 Re: Data showing up as #Deleted in Access
Previous Message Zlatko Matic 2005-12-02 10:02:11 Re: Data showing up as #Deleted in Access