Hello:
>
> What I do not understand is why you don't provide the same 
> functionality if you can, why don't you use Microsoft default 
> implementation (I ask this but I get an answer that did not convince 
> me at all).
>
I have given you the answer yet, but i will retry, the ms implementation 
does calls using ExecuteReader in some cases, and that is not valid in 
the provider when using stored procedures the actual Update 
implementation makes all the calls using ExecuteNonQuery to allow the 
stored procedure calls work always with independence of the sp syntax 
you are using.

> And in fact that is not my problem. This problem is everywhere. It's 
> where you have identity columns, where you have generators. It's 
> described and supported by Microsoft. FbProvider is a piece of code 
> that is to be integrated in their ADO.NET environment, isn't it ?
>
Have you tried using Firebird 2.0 and the new INSERT INTO ... RETURNING 
syntax or using stored procedres that returns the new row ID in an 
output parameter ( i haven't checked yet the test case with the 
comparison against sql server, hope i will be able to review it next 
week ). ???
>
> and where Microsoft says: "First, the AcceptChanges
> method of the DataRow is called to preserve the current values as 
> original
> values, and then the new values are assigned."
>
I will try to review it, right now the provider does this as explained 
in the DbDataAdapter.Update msdn documentation:

"When using *Update*, the order of execution is as follows:

   1.

      The values in the *DataRow* are moved to the parameter values.

   2.

      The OnRowUpdating
      <M_System_Data_Common_DbDataAdapter_OnRowUpdating_1_6ff1b747.htm>
      event is raised.

   3.

      The command executes.

   4.

      If the command is set to *FirstReturnedRecord*, then the first
      returned result is placed in the *DataRow*.

   5.

      If there are output parameters, they are placed in the *DataRow*.

   6.

      The *OnRowUpdated* event is raised.

   7.

      AcceptChanges <M_System_Data_DataRow_AcceptChanges.htm> is called."


What i have modified in the CVS sources for the step 7 is to check the 
value of AcceptChangesDuringUpdate before calling AcceptChanges 
<M_System_Data_DataRow_AcceptChanges.htm>.

The step 4 does not apply to the Firebird provider because there are no 
support for batch commands and because the execution is done using 
ExecuteNonQuery calls.


-- 
Carlos Guzmán Álvarez
Vigo-Spain

http://carlosga.wordpress.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to