Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Inserting Records from another table

Reply
Thread Tools

Inserting Records from another table

 
 
Bijoy Naick
Guest
Posts: n/a
 
      06-30-2004
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!
 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      06-30-2004
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.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net


"Bijoy Naick" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
inserting multiple records..... Brian ASP .Net 5 02-24-2005 08:39 PM
Inserting records into 2 identical fields at once (???) Chumley the Walrus ASP .Net 1 08-12-2004 05:40 PM
Urgent:Inserting records from datagrid through drop down list Muhammad Usman ASP .Net 1 10-16-2003 01:39 PM
Inserting Records with Bound Controls blenderdude ASP .Net 0 07-21-2003 08:49 AM
Help with inserting values from information not found in another table Joey Martin ASP General 1 07-16-2003 03:43 PM



Advertisments