Inserting Records from another table

B

Bijoy Naick

I need to be able issue a query, then insert each record in the reader
into another table.

But, when I issue the myCommand.ExecuteNonQuery call, I get an error
telling me that a reader is already open and must be closed..

How do i go about doing this?

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
S

Steve C. Orr [MVP, MCSD]

For two DataReaders to be open at the same time on your page you need two
different connections.
As an alternative you could read your first data into a DataSet instead of a
DataReader.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top