Inserting Records from another table

Discussion in 'ASP .Net' started by Bijoy Naick, Jun 30, 2004.

  1. Bijoy Naick

    Bijoy Naick Guest

    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!
    Bijoy Naick, Jun 30, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:%...
    > 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!
    Steve C. Orr [MVP, MCSD], Jun 30, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. blenderdude

    Inserting Records with Bound Controls

    blenderdude, Jul 21, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    338
    blenderdude
    Jul 21, 2003
  2. Muhammad Usman
    Replies:
    1
    Views:
    1,094
    Raja Saravanan
    Oct 16, 2003
  3. Chumley the Walrus
    Replies:
    1
    Views:
    377
    Mark Rae
    Aug 12, 2004
  4. Brian

    inserting multiple records.....

    Brian, Feb 22, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    479
    John Timney \(ASP.NET MVP\)
    Feb 24, 2005
  5. Joey Martin
    Replies:
    1
    Views:
    104
    Bob Barrows
    Jul 16, 2003
Loading...

Share This Page