Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    Cambridge
    Posts
    2

    Unanswered: Insert Recordset Results

    Hello,

    This is probably a simple question, but I have not been able to find a solution in the forums.

    I have an ASP page that returns the recordset results of a SQL Query.

    I would like to be able to take the reults of the recordset and, based on user request, insert those results into another table. I could do this by using an insert statement and resubmitting the query, but then the select statment would have to run more than once. How do I insert the results of a query already completed?

    - joe

  2. #2
    Join Date
    Mar 2004
    Posts
    6

    Lightbulb

    while it displays the first query results, you can have it create an insert statement for every row it displays. You can then either assign it a button for each row to call the function with the insert statement(s) or have asp automatically run the insert as the page loads. post the code with the first query and i'll see if i can make it a little clearer

  3. #3
    Join Date
    Mar 2004
    Location
    Cambridge
    Posts
    2

    Talking

    Thanks.

    I ended up writing the records to a hidden field and passing them to another page for the insert.

    - Joe http://www.dbforums.com/images/icons/icon10.gif

  4. #4
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    <<
    I could do this by using an insert statement and resubmitting the query, but then the select statment would have to run more than once.
    >>

    I'd probably just say so what and go for it (assuming not a high traffic site perhaps).
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •