473,324 Members | 2,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

how does SqlCommandBuilder maintain a row's key value

Hi,

The SqlCommandBuilder class seems to be able to remember
the primary key of a row such that even if I change that
key's value, it is still able to update only that row.
So I would like to know how can I update a row even when
the primary key is changed by the user? From the row's
columns' information the original information seems to be
lost so that I can specify to update only the row with
the original primary key.

Thanks for anyone's advise!
Jul 21 '05 #1
1 1305
The DataAdapter has a Diffgram that shows before and after values, actually
it's the dataset that has it, not the Adapter. So if you had a value of 1
in CustomerID for instance and you change it to 2, the effective query would
be Update MyTable Set CustomerID = 2 where CustomerID =1.
"Nick" <yk****@usc.edu> wrote in message
news:02****************************@phx.gbl...
Hi,

The SqlCommandBuilder class seems to be able to remember
the primary key of a row such that even if I change that
key's value, it is still able to update only that row.
So I would like to know how can I update a row even when
the primary key is changed by the user? From the row's
columns' information the original information seems to be
lost so that I can specify to update only the row with
the original primary key.

Thanks for anyone's advise!

Jul 21 '05 #2

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

Similar topics

3
by: Jukka K. Korpela | last post by:
I have noticed that the meaning of visibility: collapse has been discussed on different forums, but with no consensus on what it really means. Besides, implementations differ. The specification...
5
by: microsoft.private.windows.netserver.setup | last post by:
I have a very strange thing occurring in the program. I have a dataset retrieved from a stored procedure that just select * from a table. I then try to use the SQlCommandBuilder on the dataset,...
4
by: Jim Reynolds | last post by:
Hi, I am using a SqlCommandBuilder to update a Db table via an updated DataSet and SqlAdapter and it doesn't seem to be generating the activity commands from the Select command. Here is a snippet....
1
by: Nick | last post by:
Hi, The SqlCommandBuilder class seems to be able to remember the primary key of a row such that even if I change that key's value, it is still able to update only that row. So I would like to...
0
by: Gancy | last post by:
Hi, I have data access tier designed in such a way, just by changnging application settings, same lines of code is made to work with both MS SQL Server or MS Access. Code works fine with MS SQL...
1
by: andrewcw | last post by:
I have just 1 table that I am updating, the SQL I use to generate the DataTable is complex using multiple tables, however when I view the fieldnames of the DataTable from the DataSet - everything...
1
by: love2livedislife | last post by:
I have a requirement as follows: while executing the procedure for first time i'll open a cursor and read the first row from it and return the value through OUT parameter of procedure without...
1
by: bgernon | last post by:
I have a table that consists of two rows with three cells each row. The cells contain textboxes. I am able to successfully add a new row with textboxes when a button is clicked. The problem is...
0
by: Tony Johansson | last post by:
Hello! This small program below works but I have some questions about it. Below I have a piece of code that update a specific row in the northwind database. The class SqlCommandBuilder is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.