PC Review


Reply
Thread Tools Rate Thread

DataAdapter using commandbuilder's commands, not it's own.

 
 
Marina
Guest
Posts: n/a
 
      12th Dec 2003
The commands that are generated by the SqlCommandBuilder are not quite
right. I am calling GetUpdateCommand and GetDeleteCommand, modifying the
results, and assigning them to the UpdateCommand and DeleteCommand
properties of the SqlDataAdapter.

However, when the update runs, it looks like the original commands that
SqlCommandBuilder creates are being used,instead of the commands assigned to
the UpdateCommand and DeleteCommand properties.

I thought the whole point was to be able to customize the commands, assign
them to the data adapter, and have the data adapter use those instead!

If I call Dispose on the SqlCommandBuilder, then that call destroys the
SqlCommand objects GetUpdateCommand and GetDeleteCommand created that I used
as the basis.

Any ideas?


 
Reply With Quote
 
 
 
 
Marina
Guest
Posts: n/a
 
      12th Dec 2003
Sorry, wrong newsgroup, but any suggestions are welcome.

"Marina" <nospam> wrote in message
news:(E-Mail Removed)...
> The commands that are generated by the SqlCommandBuilder are not quite
> right. I am calling GetUpdateCommand and GetDeleteCommand, modifying the
> results, and assigning them to the UpdateCommand and DeleteCommand
> properties of the SqlDataAdapter.
>
> However, when the update runs, it looks like the original commands that
> SqlCommandBuilder creates are being used,instead of the commands assigned

to
> the UpdateCommand and DeleteCommand properties.
>
> I thought the whole point was to be able to customize the commands, assign
> them to the data adapter, and have the data adapter use those instead!
>
> If I call Dispose on the SqlCommandBuilder, then that call destroys the
> SqlCommand objects GetUpdateCommand and GetDeleteCommand created that I

used
> as the basis.
>
> Any ideas?
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Commands and CommandBuilder Pashkuale Microsoft ADO .NET 4 13th Oct 2005 08:41 AM
DataAdapter not updating all columns of modified row via. CommandBuilder CleverMindworks Microsoft ADO .NET 26 8th Oct 2005 07:25 PM
DataAdapter using commandbuilder's commands, not it's own. Marina Microsoft ADO .NET 1 12th Dec 2003 05:58 PM
CommandBuilder commands Konrad Microsoft ADO .NET 4 18th Sep 2003 05:09 AM
ASP.NET DataAdapter/CommandBuilder Syntax Error J. Babe Microsoft ADO .NET 2 28th Jul 2003 09:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:30 AM.