473,491 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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?
Nov 18 '05 #1
1 1154
Sorry, wrong newsgroup, but any suggestions are welcome.

"Marina" <nospam> wrote in message
news:O0**************@TK2MSFTNGP10.phx.gbl...
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?

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2229
by: randy | last post by:
Hello all, I have a DataTable which I am building column by column and adding rows after each new column. The DataTable columns match the columns in my database table. I'm building the...
13
2062
by: Doug Bell | last post by:
Hi, I thought I had this sorted this morning but it is still a problem. My application has a DataAccess Class. When it starts, it: Connects to a DB (OLE DB) If it connects it uses an...
5
254
by: randy | last post by:
Hello all, I have a DataTable which I am building column by column and adding rows after each new column. The DataTable columns match the columns in my database table. I'm building the...
6
13979
by: Rich | last post by:
Dim da As New SqlDataAdapter("Select * from tbl1", conn) dim tblx As New DataTable da.Fill(tblx) '--works OK up to this point da.UpdateCommand = New SqlCommand da.UpdateCommand.Connection =...
0
7115
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3086
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.