G
Guest
Hi
I have a design decision to make. I must choose between a DataAdapter.Update() and many DbCommands (actually SqlCommands)
Let's assume that a small percentange of the columns need to be modified on average. This would suggest that long strings of SQL will be traveling to the server and back (assuming we have corresponding SELECT statements appended to the UPDATE statements) unnecessarily. Issuing taylor made commands that only send the necessary SQL seems at first sight to be much more efficient. However, I do not know what optimizations are done by ADO.NET behind the scenes when using DataAdapters. It occurs to me that at least, the UpdateCommand's string will be prepared and compiled at the server significantly increasing the overall efficiency
So, is there a clear answer as to which mechanism I should use? Would someone care to share their experience and/or insight in this matter
Thanks
Juan Dent
I have a design decision to make. I must choose between a DataAdapter.Update() and many DbCommands (actually SqlCommands)
Let's assume that a small percentange of the columns need to be modified on average. This would suggest that long strings of SQL will be traveling to the server and back (assuming we have corresponding SELECT statements appended to the UPDATE statements) unnecessarily. Issuing taylor made commands that only send the necessary SQL seems at first sight to be much more efficient. However, I do not know what optimizations are done by ADO.NET behind the scenes when using DataAdapters. It occurs to me that at least, the UpdateCommand's string will be prepared and compiled at the server significantly increasing the overall efficiency
So, is there a clear answer as to which mechanism I should use? Would someone care to share their experience and/or insight in this matter
Thanks
Juan Dent