A
Andrew Bourne
I would like to insert multiple records into a table
based on a query returned from the same table. For
example a datareader returns 3 records containing the
following records
user1 file1 group1
user1 file2 group1
I would then like to insert records into the table based
on the datareader but change the last field to the
following
user1 file1 group2
user1 file2 group2
The final result in the table should then be
user1 file1 group1
user1 file2 group1
user1 file1 group2
user1 file2 group2
I have tried looping through the datareader and doing a
insert via executenonquery. I have also tried using a
dataset and adding to the dataset.
Any help with this issue will be much appreciated
based on a query returned from the same table. For
example a datareader returns 3 records containing the
following records
user1 file1 group1
user1 file2 group1
I would then like to insert records into the table based
on the datareader but change the last field to the
following
user1 file1 group2
user1 file2 group2
The final result in the table should then be
user1 file1 group1
user1 file2 group1
user1 file1 group2
user1 file2 group2
I have tried looping through the datareader and doing a
insert via executenonquery. I have also tried using a
dataset and adding to the dataset.
Any help with this issue will be much appreciated