hello,
Im trying to move data between a source database and a target database, both databases are on different locations, so i made 2 connection strings.
this is what i have so far:
//removed all the declarations!
Sourceadapter.Fill(SourceDataset)
SourcaDatatable = SourceDataset.Tables(0)
targetdataset = SourceDataset
targetdatatable = SourceDataset.Tables(0)
targetadapter.Update(SourceDataset.Tables(0))
i have made a for loop to test the out put:
For Each targetDatarow In targetdatatable.Rows
Console.WriteLine(targetDatarow("event_id"))
Next
how do i get the data in the target database, im trying to copy 16 tables like this, after that it needs to go row by row on a fixed period..
has anyone got a clue?
thanks in advance
greetz Frank
FrankPosted Feb 15, 2008, 2:59 AM
thanks for your repley, can you please elaborate on it a bit more?
do you mean like using a datareader and use those values to do the inserts?
greetz Frank
Mahesh ChandPosted Feb 14, 2008, 12:38 PM
I think it will be faster for you to copy data from one database to another using "INSERT INTO .. FROM ...." SQL query than looping thorugh the DataSet rows.