473,398 Members | 2,343 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,398 software developers and data experts.

Copying one dataset to another

bh
Ladies and Gentlemen,

I need to transfer some data from Access accross to a table in SQL. I would
use DTS except Im am using the Express version of SQL.

I have set up 2 datasets in visual studio and would like to copy the data
from one dataset to another.

I have tried importrow but this does not update the table for some reason!

Please, please, please help?

Apr 26 '06 #1
5 1863
Try the clone method.

"bh" wrote:
Ladies and Gentlemen,

I need to transfer some data from Access accross to a table in SQL. I would
use DTS except Im am using the Express version of SQL.

I have set up 2 datasets in visual studio and would like to copy the data
from one dataset to another.

I have tried importrow but this does not update the table for some reason!

Please, please, please help?

Apr 26 '06 #2
Check this out.
http://msdn.microsoft.com/library/de...etcontents.asp

"bh" wrote:
Ladies and Gentlemen,

I need to transfer some data from Access accross to a table in SQL. I would
use DTS except Im am using the Express version of SQL.

I have set up 2 datasets in visual studio and would like to copy the data
from one dataset to another.

I have tried importrow but this does not update the table for some reason!

Please, please, please help?

Apr 26 '06 #3
bh
Hi Chris,

Not sure if the clone method will work. This just creates a copy of the
dataset. I have two datasets that are identical - one has data from an
Access database the other has no data from a SQL database. I want to
populate the SQL database with the Access data. I have two data grids on a
form for each of the datasets. By using importrow (as below) I am able to
copy the data to the other datagrid but for some strange reason the data wont
save?

Weird!!!
DataRow[] copyRows = custDS.Tables["Customers"].Select("Country = 'Germany'");

DataTable custTable = custGermanyDS.Tables["Customers"];

foreach (DataRow copyRow in copyRows)
custTable.ImportRow(copyRow);

"Chris" wrote:
Check this out.
http://msdn.microsoft.com/library/de...etcontents.asp

"bh" wrote:
Ladies and Gentlemen,

I need to transfer some data from Access accross to a table in SQL. I would
use DTS except Im am using the Express version of SQL.

I have set up 2 datasets in visual studio and would like to copy the data
from one dataset to another.

I have tried importrow but this does not update the table for some reason!

Please, please, please help?

Apr 27 '06 #4
No therefore gave Chris you probably another link which shows the copy
method.

As he had not done it, than I had done it.

Cor

"bh" <bh@discussions.microsoft.com> schreef in bericht
news:05**********************************@microsof t.com...
Hi Chris,

Not sure if the clone method will work. This just creates a copy of the
dataset. I have two datasets that are identical - one has data from an
Access database the other has no data from a SQL database. I want to
populate the SQL database with the Access data. I have two data grids on
a
form for each of the datasets. By using importrow (as below) I am able to
copy the data to the other datagrid but for some strange reason the data
wont
save?

Weird!!!
DataRow[] copyRows = custDS.Tables["Customers"].Select("Country =
'Germany'");

DataTable custTable = custGermanyDS.Tables["Customers"];

foreach (DataRow copyRow in copyRows)
custTable.ImportRow(copyRow);

"Chris" wrote:
Check this out.
http://msdn.microsoft.com/library/de...etcontents.asp

"bh" wrote:
> Ladies and Gentlemen,
>
> I need to transfer some data from Access accross to a table in SQL. I
> would
> use DTS except Im am using the Express version of SQL.
>
> I have set up 2 datasets in visual studio and would like to copy the
> data
> from one dataset to another.
>
> I have tried importrow but this does not update the table for some
> reason!
>
> Please, please, please help?
>

Apr 27 '06 #5
bh
Still no joy!! I can see the data pass accross to the datagrid but it wont
save the changes to the sql table!
"Cor Ligthert [MVP]" wrote:
No therefore gave Chris you probably another link which shows the copy
method.

As he had not done it, than I had done it.

Cor

"bh" <bh@discussions.microsoft.com> schreef in bericht
news:05**********************************@microsof t.com...
Hi Chris,

Not sure if the clone method will work. This just creates a copy of the
dataset. I have two datasets that are identical - one has data from an
Access database the other has no data from a SQL database. I want to
populate the SQL database with the Access data. I have two data grids on
a
form for each of the datasets. By using importrow (as below) I am able to
copy the data to the other datagrid but for some strange reason the data
wont
save?

Weird!!!
DataRow[] copyRows = custDS.Tables["Customers"].Select("Country =
'Germany'");

DataTable custTable = custGermanyDS.Tables["Customers"];

foreach (DataRow copyRow in copyRows)
custTable.ImportRow(copyRow);

"Chris" wrote:
Check this out.
http://msdn.microsoft.com/library/de...etcontents.asp

"bh" wrote:

> Ladies and Gentlemen,
>
> I need to transfer some data from Access accross to a table in SQL. I
> would
> use DTS except Im am using the Express version of SQL.
>
> I have set up 2 datasets in visual studio and would like to copy the
> data
> from one dataset to another.
>
> I have tried importrow but this does not update the table for some
> reason!
>
> Please, please, please help?
>


Apr 27 '06 #6

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

Similar topics

3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
2
by: Nedu N | last post by:
Hi Techies, I am facing problem in copying content of table from a untyped dataset into to a table inside the typed dataset. I wanted to copy the data into typed dataset in order to ease the...
2
by: | last post by:
This should be simple, for someone... I have an access database and I want to copy records from one table in one db to another table in another Access db. I tried creating a dataset for both and...
2
by: Rick Palmer | last post by:
OK, I got something REALLY simple-sounding that is turning in to something REALLY frickin hard. All I need to do is suck the data out of one Access database and stuff it in another one. Here's my...
11
by: Geoff | last post by:
Hi I have a DataTable with thousands of rows. I want a quick way to insert the rows into a table in an Access database with the same structure. I have been using an update command but found it...
6
by: Ryan | last post by:
I have 2 Access '97 databases. I am trying to migrate all the data from one to the other (append to existing records). I do not have Access '97 and opening with Access XP or later causes...
1
by: Ryan | last post by:
I have an instance of a Dataset on one form that I want to copy all records of a particular Datatable to another forms Datatable (same Dataset/table, etc). Any way to do this? I've been looking...
1
by: tshad | last post by:
Running on VS.net 2005, I am trying to copy rows from my datatable to another datatable in the same dataset. The schema would be identical. I need to make the table name "forms" as I am...
11
by: Aads | last post by:
Hi there, Is there any method or a way to copy a form object to a variable? Let me explain this - We have a method called "Copy" for the Dataset class & you all must be knowing that...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
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...

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.