Skip site navigation (1) Skip section navigation (2)

Re: ODBC Interface version 07_01_0005, problem with C++ exceptions

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: mister_ics(at)hotmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org, "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: ODBC Interface version 07_01_0005, problem with C++ exceptions
Date: 2001-06-14 06:51:18
Message-ID: 3B285EE6.CD34DA6@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-odbc
Mister X wrote:
> 
> Hi,
> 
> developing in MFC/Visual Studio 6  I've encountered a strange problem
> in last version of ODBC Driver  (actually 07_01_0005). Each time a SQL
> error occours, the istructions TRY/ CATCH doesn't report the error
> string: the CDBException ' member m_strError is empty
> Follows an example:
> 
> // MFC C++ Code
> 
> CDatabase myDB;
> 
> [.....]   // Init and Open database...
> 
> //create a table with a WRONG SQL statement:
> 
> CString sSQLStatement="CREATE TABLE Dummy (  int DummyID, )";
>                         // The statement is WRONG beacuse the comma
> after the last column definition.
> 
> //Executes The statement and catch errors:
> 
> TRY
>         {
>         myDB.ExecuteSQL(sSQLStatement);
>         }
>         CATCH(CDBException, e)
>         {
>         AfxMessageBox(e->m_strError);
>         }
> END_CATCH
> 
> Well, with driver version v06-50-0000  i got the string "Error
> creating the table; ERROR:  parser: parse error at or near ")", that
> it is the correct error message from the back-end.
> Instead, with Version  07_01_0005 of the ODBC driver,  the string
> e->m_strError is always empty, and the member m_nRetCode of
> CDBException class is = -1;

Probably the cause is the same as another bug I recently
found. I'm asking pgsql-obdc ML why the error handling was
changed.

regards,
Hiroshi Inoue

In response to

Responses

pgsql-odbc by date

Next:From: Dave PageDate: 2001-06-14 08:04:38
Subject: RE: Error handling in ODBC
Previous:From: Hiroshi InoueDate: 2001-06-14 06:27:06
Subject: Error handling in ODBC

pgsql-bugs by date

Next:From: Mister icsDate: 2001-06-14 10:26:37
Subject: Re: ODBC Interface version 07_01_0005, problem with C++ exceptions
Previous:From: Tom LaneDate: 2001-06-14 06:39:31
Subject: Re: Segmentation fault in psql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group