+ Reply to Thread
Results 1 to 3 of 3

Thread: passing multiple query values into memory?

  1. #1
    Contracted Slave Centurion is on a distinguished road Centurion's Avatar
    Join Date
    Dec 2008
    Posts
    533
    Rep Power
    4

    passing multiple query values into memory?

    Hello ppl,

    I am running a query which returns various records.

    I want to put the ID's of each record returned into memory so that in the next stage I may run my Insert code based on the ID's that were returned in the query.

    How can i do this?


  2. #2
    Contracted Slave Centurion is on a distinguished road Centurion's Avatar
    Join Date
    Dec 2008
    Posts
    533
    Rep Power
    4

    My theory was:

    Code:
    do until rs.EOF
      for each x in rs.Fields
        RUN THE INSERT CODE HERE
      next
      Response.Write("<br />")
      rs.MoveNext
    loop
    

  3. #3
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    Typically, you can do something like
    Code:
    do while not rs.EOF
        cn.Execute("INSERT INTO tablename (col1) VALUES(" & rs("col1") & ")")
        Response.Write("<br />")
        rs.MoveNext
    loop
    
    Above, cn is the name of your connection object.
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


+ Reply to Thread

Similar Threads

  1. help with if statement passing multiple criteria
    By Rebelle in forum ASP Development
    Replies: 2
    Last Post: November 6th, 2009, 03:24 PM
  2. Replies: 5
    Last Post: November 1st, 2009, 05:16 PM
  3. Capturing keystrokes in textbox and passing values to function
    By richyrich in forum JavaScript Programming
    Replies: 1
    Last Post: June 15th, 2009, 10:37 AM
  4. href, passing values
    By Rebelle in forum ASP Development
    Replies: 14
    Last Post: June 10th, 2009, 11:30 PM
  5. when using multiple search values
    By Rebelle in forum Microsoft Access
    Replies: 2
    Last Post: February 6th, 2009, 04:03 PM

Bookmarks

Posting Permissions

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

SEO by vBSEO