473,320 Members | 1,694 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,320 software developers and data experts.

Update and AcceptChanges

Hi all
when I call Update method of SqlDataAdaptor it calls AcceptChanges
automatically.is it possible to prevent calling AcceptChanges??
I know I can use GetChanges method but because in my table the primary key
is auto number when I merge back the changes, it shows the channges twice in
DataGrid.
thanks in advance..
Dec 11 '05 #1
1 1981
perspolis,

The only way I can think of doing this would be to actually copy the
data set (using GetChanges) and then perform the update on that. You would
then have to merge the changes back with the original data set.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"perspolis" <re*****@hotmail.com> wrote in message
news:uu*************@tk2msftngp13.phx.gbl...
Hi all
when I call Update method of SqlDataAdaptor it calls AcceptChanges
automatically.is it possible to prevent calling AcceptChanges??
I know I can use GetChanges method but because in my table the primary key
is auto number when I merge back the changes, it shows the channges twice
in
DataGrid.
thanks in advance..

Dec 11 '05 #2

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

Similar topics

1
by: Shahar | last post by:
Hi Why this code does not updated the DB, just the DataSet: DataSet ds = new DataSet(); OleDbDataAdapter adapter = new OleDbDataAdapter("Select * from Employees",...
6
by: John J. Hughes II | last post by:
Normally when I use the Adaptor update function and it work fine but sometimes I get a "duplicate entry" error after the merge. I believe the problem is because the primary key is modified and the...
3
by: Justin | last post by:
I have created a dataset with two tables and an insert command, I need to be able to retreive the Key Identity after inserting into table "A" for use in table "B". Should I use ExecuteScalar()...
1
by: !!bogus | last post by:
Hi, This is partial code. I am trying to update the table, but it is not working and I am not sure why. Can you please help? I don't get any errors, but the table is not updated. I am sure I am...
2
by: Calvin KD | last post by:
Hi everyone, I know the solution to my problem is probably very simple but I just can't seem to figure out how to do it. My problem is, I have an XML file as a datastore, I read it into a dataset...
3
by: Wanda | last post by:
I am using vb.net and have a bounded datagrid by using SQLDataAdaptor and SQLDataSet, it does show the data when it is first loaded. But when I change the data on the datagrid, it doesn't update...
1
by: Tony Papadimitriou | last post by:
Hi, Here's a short description of a problem that took me a couple of days to bypass (not solve): I update a table thru a dataview (or dataset, no difference in behavior for this problem) and...
8
by: Zorpiedoman | last post by:
I keep getting a concurrency exception the second time I make a change and attempt to update a dataadapter. It appears this is by design, so there must be something I can do to avoid it. ...
15
by: Scotty | last post by:
I like to have a good insert, update and delete code The code below sometimes workl ok sometimes doesnt work, what i am doing wrong?? Sub SaveAny() Dim command_builder As New...
3
by: C a r l o s A n t o n i o | last post by:
Hello, How can I update a datarow in a typed dataset? It seems i can't make it to write the changes into the database. What am i doing wrong? Thanks in advance. Here's my code: Private...
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
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.