A
Aaron
Hello,
The SqlDataAdapter has 4 properties of type SqlCommand, SelectCommand,
UpdateCommand, DeleteCommand, and InsertCommand. Setting the
SelectCommand allows the SqlDataAdapter to retrieve data from the
database using the fill method. Aside from that, I don't see much of a
difference. The SelectCommand can be used to insert, update, and
delete all by using the ExecuteNonQuery method. So UpdateCommand,
DeleteCommand, and InsertCommand seem to be somewhat redundant.
The SqlDataAdapter Update method is supposed to, relative to the data
obtained from the Fill method, writeback any changes to the database.
The documentation for UpdateCommand, etc is vague but seems to indicate
that the developer can use UpdateCommand, etc to override or supplement
the auto generated commands when Update is executed (????).
What is the function of these commands?
Thanks,
Aaron
The SqlDataAdapter has 4 properties of type SqlCommand, SelectCommand,
UpdateCommand, DeleteCommand, and InsertCommand. Setting the
SelectCommand allows the SqlDataAdapter to retrieve data from the
database using the fill method. Aside from that, I don't see much of a
difference. The SelectCommand can be used to insert, update, and
delete all by using the ExecuteNonQuery method. So UpdateCommand,
DeleteCommand, and InsertCommand seem to be somewhat redundant.
The SqlDataAdapter Update method is supposed to, relative to the data
obtained from the Fill method, writeback any changes to the database.
The documentation for UpdateCommand, etc is vague but seems to indicate
that the developer can use UpdateCommand, etc to override or supplement
the auto generated commands when Update is executed (????).
What is the function of these commands?
Thanks,
Aaron