Results 1 to 3 of 3

Thread: Update problem

  1. #1
    Join Date
    Feb 2003

    Unanswered: Update problem


    I have a detail page that will list all records in a table with an ID passed by the url on the previous page. The page uses repreat region to list X amount of records with that ID.

    What I am trying to do is make all records on the page editable or able to update all records at the same time.

    Can this be done?

    Does each record have to be in a seperate form with a seperate submit button, or can you have one form and one button to update the whole page. Ideally I want the page to have the appearance of an Excel or Access spreadsheet, where you can modify any of the text fields.

    Can anyone give me any help or does anyone know any tutorials that might help.



  2. #2
    Join Date
    Feb 2003
    I guess what I mean is a batch update or to submit multiple records for update.

    Any help or useful links would appreciated,


  3. #3
    Join Date
    Feb 2003
    Los Angeles

    Re: Update problem

    Originally posted by speng
    Can this be done?
    Yes, this can be done and it's very simple,
    all you need to do is a loop inside form that
    gets all the ID's and list them into text boxes
    (if you like it to look like Excel or Access
    spreadsheet you need to change the look/style of the text box)
    for each text box you give the same name + the Var from the loop
    for example :

    For I = 0 To Rs.RecordCount
    response.write "<Input Type=Text Name='ID"&I&"' Value='"Rs("ID")"'>

    now you got all the ID's in text boxes, when submit you make
    the same query that you made on the form page and run a loop
    to generate a SQL query to Update/Insert the values

    SQL = "Update . . . . ."
    For I = 0 To Rs.RecordCount
    SQL = SQL & Request.Form("ID"&I)

    NOTE : you need to make your own SQL query, this is just the concept!

    you can use this as a reference :
    And my favorite -

Posting Permissions

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