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

oledb DataAdapter and DataTables

Hi,

Anyone know if it is possible to change the RowState of a DataRow in a
DataTable. I have a DataTable that has been built up from a combination of
reading from a database and some user input. What I want to do is to 'trick'
it into writing new rows into a different (but with the same fieldnames)
table in the database. I thought if I could change the RowState of all the
rows to 'DataRowState.Added' then I could use a DataAdapter.Update to
automagically create all the new rows.

Anyone got any thought on this, or suggestions of how best to make it work?

Thanks

Chris.
Jul 21 '05 #1
1 1125
Chris,

Probably you only need this,

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

However know what kind of primary key you are using. Otherwise it will give
you probably only concurrency errors.

Cor
Jul 21 '05 #2

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

Similar topics

1
by: Harry V | last post by:
I'm wondering if there is a limit of a single select, delete and insert statement (command) to each dataadapter? On a form, I have a dataconnection that is shared by 3 dataadapters, one for each of...
3
by: Brian Foree | last post by:
I am developing an ASP.NET application that uses Access 2000 as its backend, and have just started getting the following error on 2 ASP.NET pages that had been working until late last week (and I...
0
by: Doug Bell | last post by:
Hi, I think I have misunderstood the Update Method of DataAdapters. Can you use the Update Method to refresh a DataSet DataTable using the DataAdapter's Update Method or is it solely for...
13
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...
1
by: Chris Mayers | last post by:
Hi, Anyone know if it is possible to change the RowState of a DataRow in a DataTable. I have a DataTable that has been built up from a combination of reading from a database and some user input....
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. ...
0
by: Steve | last post by:
C# Is it possible to fill 2 different DataTables with one DataAdapter? I have a dataset comprising 2 tables, one is the child table of the other. Then my dataAdapter is configured something...
0
by: mike1402 | last post by:
Hi ! I get the error below sometimes when retrieving a big amount of data using Datadapter.Fill(dataset,"table"). But when I send the command Fill again, there is no error. Is it a fault of...
4
by: melryin | last post by:
Hi, I'm a newbie in C#, I wrote an OLEDb query with positioned parameter. It seems not working. Can anyone please point out where I've done wrong? Thanks in advance. Here is my code: using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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,...

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.