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

ODBC Interface Bug in version 07_01_0005

From: Mister X <mister_ics(at)hotmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: ODBC Interface Bug in version 07_01_0005
Date: 2001-06-13 06:39:10
Message-ID: (view raw or whole thread)
Lists: pgsql-bugs

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:

	CATCH(CDBException, e)

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;
Handling errors with C++ exception is a great thing, i thing this is a
bug of ODBC driver. The only way to discover the SQL errors reported
by the back-end is to analyze the driver connection log, after each
SQLExecute failed istruction, and it is not very very confortable for
the programmer :)

 Thank you.

Silvio.   mister_ics(at)hotmail(dot)com

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2001-06-13 12:35:47
Subject: "WHERE col NOT IN" yields falsely empty result.
Previous:From: Vinod KurupDate: 2001-06-13 02:39:54
Subject: Re: coalesce in execute crashes backend

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