Discussion:
[Firebird-odbc-devel] OdbcFb 2.0 raises error when delete empty set
Ivan Ravin
2011-01-27 08:25:55 UTC
Permalink
OdbcFb 2.0 raises error when execute DELETE statement on empty table or
delete on empty set:



delete from DCT$Objects where Object_Name='AH_EXPORT_FACT'

[ODBC Firebird Driver]No rows updated or deleted
Execution Failed!





There is no such error with 1.2 driver, but every 2.0 driver raise it:

OdbcJdbc v2-0-Beta Ver 02.00.00.0144
OdbcJdbc Ver RC1_2-0-0148
OdbcJdbc Ver RC1_2-0-0150


And error message looks like UPDATE statement on empty set will raise it too
Alexander Potapchenko
2011-01-27 10:22:09 UTC
Permalink
Post by Ivan Ravin
No rows updated or deleted
I think that SQLExecute returns SQL_SUCCESS_WITH_INFO (warning) instead
of SQL_ERROR.
I think it is correctly.


Regards,
Alexander
--
Alexander Potapchenko
Lead developer
LASP technology, http://www.lasptech.ru
Ivan Ravin
2011-03-09 07:31:12 UTC
Permalink
Is it possible to make this behavior tunable in datasource options (make
indicator "ODBC driver 1.x compatible" or something else, like transaction,
dialect or identifier options)?

Some programs support Firebird like outdated server and don't want support
new features and accept warnings like errors. I got this exception in CA
Data Modeler
(http://erwin.com/products/detail/ca_erwin_data_modeler_standard_edition/):



delete from DCT$Objects where Object_Name='AH_EXPORT_FACT'



[ODBC Firebird Driver]No rows updated or deleted

Execution Failed!







_____

From: Alexander Potapchenko [mailto:***@gmail.com]
Sent: Thursday, January 27, 2011 1:22 PM
To: firebird-odbc-***@lists.sourceforge.net
Subject: Re: [Firebird-odbc-devel] OdbcFb 2.0 raises error when delete empty
set



On 27.01.2011 11:25, Ivan Ravin wrote:

No rows updated or deleted

I think that SQLExecute returns SQL_SUCCESS_WITH_INFO (warning) instead of
SQL_ERROR.
I think it is correctly.


Regards,
Alexander
--
Alexander Potapchenko
Lead developer
LASP technology, http://www.lasptech.ru
Alexander Potapchenko
2011-03-09 08:23:29 UTC
Permalink
Post by Ivan Ravin
Is it possible to make this behavior tunable in datasource options
(make indicator "ODBC driver 1.x compatible" or something else, like
transaction, dialect or identifier options)?
Some programs support Firebird like outdated server and don't want
support new features and accept warnings like errors. I got this
exception in CA Data Modeler
delete from DCT$Objects where Object_Name='AH_EXPORT_FACT'
[ODBC Firebird Driver]No rows updated or deleted
Execution Failed!
Hi Ivan,
For information: this code is added here -
http://tracker.firebirdsql.org/browse/ODBC-13.
If CA Data Modeler can't work with warnings, then I think you need
special build...

Regards,
Alexander
--
Alexander Potapchenko
Lead developer
LASP technology, http://www.lasptech.ru
Loading...