473,503 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to flag dataset rows as new

cj
I am copying rows from a database/table on Server_A to a database/table
on Server_B. I use Server_A_DataAdapter.fill to load the rows into a
dataset. Then Server_B_DataAdapter.update to put the rows into the
database/table on Server_B. I then notice that the rows are not being
put on Server_B via the insert command of Server_B_DataAdapter because
the rows are not new to the dataset.

How can I flag the rows in the dataset as new?
Or is there a better way to accomplish this task?

Thanks
Dec 7 '05 #1
4 1086
CJ,

By setting the acceptchangesafterfill property from the dataadapter to false

I hope this helps,

Cor
Dec 7 '05 #2
cj
I don't see acceptchangesafterfill in the help.
I see:
DataRow.AcceptChanges Method [Visual Basic]
Commits all the changes made to this row since the last time
AcceptChanges was called.

DataAdapter.AcceptChangesDuringFill Property [Visual Basic]
Gets or sets a value indicating whether AcceptChanges is called on a
DataRow after it is added to the DataTable during any of the Fill
operations.

How would I use acceptchanges.... in the below code.
MyOdbcAdapter.Fill(MyDs, "recent_calls")
SqlDataAdapter1.Update(MyDs, "recent_calls")
Cor Ligthert [MVP] wrote:
CJ,

By setting the acceptchangesafterfill property from the dataadapter to false

I hope this helps,

Cor

Dec 7 '05 #3
CJ,

It is duringfill

http://msdn.microsoft.com/library/de...gfilltopic.asp

I hope this helps,

Cor
Dec 7 '05 #4
cj
They don't have any examples of how this is used but this seems to work.
Thanks for the help.

MyOdbcAdapter.AcceptChangesDuringFill = False
MyOdbcAdapter.Fill(MyDs, "recent_calls")
SqlDataAdapter1.Update(MyDs, "recent_calls")
Cor Ligthert [MVP] wrote:
CJ,

It is duringfill

http://msdn.microsoft.com/library/de...gfilltopic.asp

I hope this helps,

Cor

Dec 7 '05 #5

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

Similar topics

3
4566
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
1
8570
by: Fleckman | last post by:
I have a situation where I need to add rows to tables with a Parent-Child relationship which presents a constraints violation when I reject the changes. Here is the scenario: I add a row to a...
2
2178
by: shine | last post by:
I want to retrieve first 3 records of first table and last 4 records of second table, How to do this using c# and dataset? Any suggestion would be greatly appretiated
0
5797
by: M. David Johnson | last post by:
I cannot get my OleDbDataAdapter to update my database table from my local dataset table. The Knowledge Base doesn't seem to help - see item 10 below. I have a Microsoft Access 2000 database...
22
4203
by: EMW | last post by:
Hi, I managed to create a SQL server database and a table in it. The table is empty and that brings me to my next chalenge: How can I get the info in the table in the dataset to go in an empty...
12
1976
by: Graham Blandford | last post by:
Hi all, Would someone be able to tell me the most 'graceful' way of removing unwanted rows from a dataset based on a condition prior to update? OR, resetting the rows all to unchanged after they...
3
2727
by: AH | last post by:
Hi all, I noticed this strange behavior; I created a new control (example inherits from textbox) and add a new property, then I bind this new property to a field in my dataTable in a dataSet....
4
2222
by: Al | last post by:
I have this scenario: 1. XML file with schema and data is created from SQL Server tables. XML file contains 6 tables, some of them have rows, some of them are empty. 2. XML file is given to the...
1
2508
by: matt | last post by:
hello, i have a web app that allows users to query our oracle db and produce a dataset of report data. they then have the option to serialize this data and store it in the database. later, then...
0
7202
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
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7330
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
7460
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
3167
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
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.