473,473 Members | 4,176 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Manipulating data between data adapters

Hi

I have two data adapters bound to two separate tables. How can I;

1. Loop through all records one by one in one of them while reading column
values, and

2. Insert a record from data adapter A into data adapter B

via code?

Thanks

Regards
Aug 28 '06 #1
3 1221
John,

Don't call those things DataAdapters. It are DataSets, to be more precise
Strongly Typed DataSets.

A datarow in a table has a reference set to that table in the datarow. That
is needed to know the description of the items which are in the Columns
collection, even if it is not in the table.

As well is there often not one row, but two rows, the original one and the
current one in a datatable.

All this makes it difficult to pull a row from one table and to place it in
the other.

The receiving table to be a clone of the sending one.

Therefore it is mostly only possible to create a datarow in whatever way in
the new table and than to fill the items for that.

For that I like very much the loaddatarow from the datatable
http://msdn2.microsoft.com/en-us/lib...addatarow.aspx

Others like more the ItemArray property from the datarow
http://msdn2.microsoft.com/en-us/lib...itemarray.aspx

I hope this gives an idea,

Cor






"John" <Jo**@nospam.infovis.co.ukschreef in bericht
news:eK**************@TK2MSFTNGP05.phx.gbl...
Hi

I have two data adapters bound to two separate tables. How can I;

1. Loop through all records one by one in one of them while reading column
values, and

2. Insert a record from data adapter A into data adapter B

via code?

Thanks

Regards


Aug 28 '06 #2
Hi John,

I would use two commands and two connections.
One command should read data while the other should write.
But you'll need two connections - one per each command as reading needs a
conneciton opened all the time.
--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"John" <Jo**@nospam.infovis.co.ukwrote in message
news:eK**************@TK2MSFTNGP05.phx.gbl...
Hi

I have two data adapters bound to two separate tables. How can I;

1. Loop through all records one by one in one of them while reading column
values, and

2. Insert a record from data adapter A into data adapter B

via code?

Thanks

Regards


Aug 28 '06 #3
Ah no. Do not use ADO.NET for this (or any data access query interface). Use
an INSERT to move the rows on the server (the database engine). Don't bring
rows to your client to do bulk updates.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"John" <Jo**@nospam.infovis.co.ukwrote in message
news:eK**************@TK2MSFTNGP05.phx.gbl...
Hi

I have two data adapters bound to two separate tables. How can I;

1. Loop through all records one by one in one of them while reading column
values, and

2. Insert a record from data adapter A into data adapter B

via code?

Thanks

Regards


Aug 28 '06 #4

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

Similar topics

5
by: Kevin C | last post by:
I was curious to know what some developers out in the industry are doing when it comes to exposing Data access logic, specifically persistence. This is assuming that your not using an O/R framework...
5
by: amanatio | last post by:
I have a huge form with many data bound controls on it and 34 tables in database (and of course 34 data adapters and 34 datasets). The form is extremely slow to design (huge delay when I go to code...
2
by: Mervin Williams | last post by:
I am using Infragistics UltraWebTab (a tab folder control for ASP.NET). My tab folder control will include five tab pages with a separate web form on each, and these web forms will share data. ...
3
by: Robin | last post by:
When adding a SQL Data Adapter to a page, is possible to configure it use a connection string in code? As I have found it regenerates the code each time and of the adapters are modified and does...
5
by: Rick | last post by:
The data adapter wizard allows you to add more than one table, but that doesn't seem to work right when setting up a dataset. Some of the documentation I have read states that only one table...
0
by: dimpy | last post by:
Hi everyone, I am using some big size data adapters to fill datasets to be sent to a web service. Now every time i get an error in datatype or constraints violations while filling the dataset, I...
0
by: Paul Craig | last post by:
Hi everyone, I have recently upgraded several of my projects from Visual Studio 2003 to 2005 and everything went across quite smoothly. The main problem that I am having is I have used SQL Data...
1
by: Justin | last post by:
We decided to upgrade to 2005 and upgrade our components. After fixing a few odds and end the upgrade was complete and our project was working fine. We didn't run into problems until we needed to...
12
by: Randy | last post by:
Hi, Trying to pass along a table row delete to the datasource, but I'm crashing. Here is the code: Private Sub btnDeleteIngr_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles...
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...
0
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
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,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.