Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy one dataset to another

Status
Not open for further replies.

arrian

Programmer
Nov 11, 2003
93
0
0
CA
Here's the issue:

I have Crystal Reports built using XSD files in the project. I have datasets built in code that will contan data that I need to put into the typed datasets of the project. Only problem is I'm not sure how to do this, other than 1 row at a time. There is potentially a LOT of data that's going to need to be moved from one dataset into the other, and this can take a while if it's one row at a time. And I can't just move the table, as I need the data to show up in the Crystal Report. Any ideas?
 
Use the Copy method of the original dataset:

Dim ds1 As DataSet
Dim ds2 As DataSet

'code to fill ds1 here

ds2 = ds1.Copy


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Wow... I'm kind of dissapointed that I didn't figure that out... That's rediculously easy... Thanks!
 
Ok, the problem I'm having is the datasets that need to recieve the data are typed datasets. How do I get the data from a dataset filled from my Access DB into the typed dataset? The copy command doesn't seem to work.
 
Can't you fill the typed dataset the same way you filled the first dataset?
 
I had hoped I could, but that doesn't seem to work... I was filling the other dataset with a data adapter, and that doesn't seem to work... I actually did find a way to do this, I think... Other things aren't working, so I'm not 100% sure this works.

ds1.Merge(ds2)
 
I was filling the other dataset with a data adapter, and that doesn't seem to work

Does it fail with an error message? What is the problem?


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top