473,379 Members | 1,330 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,379 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 1124
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: 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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.