From: Carlos G. A. <car...@te...> - 2003-03-20 19:18:34
|
Hello: >Current implementation of Firebird .Net provider forces usage of >transactions for ExecuteScalar and ExecuteReader. In my oppinion, >using transactions should be mandatory only for ExecuteNonQuery method >(INSERT, UPDATE, DELETE statements etc.) as in Microsoft's >implementation of Odbc and Sql data providers. For example, Easysoft >ODBC driver for Interbase/Firebird does not require transactions in >order to execute ExecuteReader and ExecuteScalar methods which is, I >think, desirable behaviour. >This incompatibility makes hard to develop generic (data provider >independent code) which is Interface based. For ExecuteScalar it can be of interest, but for ExecuteReader i need to make some test making update, delete and insert operations using a DataAdapter, i tell this because as i remember DbDataAdapter make calls to ExecuteReader instead of ExecuteNonQuery, but i want to verify it. Any thoughts ??? >2) Small issue in ExecuteNonQuery() method in FbCommand class. >According to documentation: >For UPDATE, INSERT, and DELETE statements, the return value is the >number of rows affected by the command. For all other types of >statements, the return value is -1. >But, it appears that when no records are affected in UPDATE opperation >(I haven't checked other SQL statements) return value is -1 instead of >0. Fixed in CVS, please if yo can test it, i will try to make a NUnit test tomorrow. -- Best regards Carlos Guzmán Álvarez Vigo-España "No tengo dones especiales.Sólo soy apasionadamente curioso" Albert Einstein, científico. |