storing in the db at the end of the submission

Results 1 to 2 of 2

Thread: storing in the db at the end of the submission

  1. #1
    susy Guest

    Default storing in the db at the end of the submission

    I have a problem , <BR>I&#039m preparing an online test. Here I&#039m fetching the questions and the answers to be asked from the database(access as of now, to be updated to sqlserver), the answers are in the form of check boxes. After each question is answered I dont want to update the database. I want to store these answers in an array . After the test is complete then I want to update the database. This is the first doubt.<BR>Also each question being asked is from a particular topic, so when updating the database I want to take care such that if there are some questions from one topic the updation in the db should be in just one row , ie. row count should get updated. <BR>If the question is from another topic then a new row is added in the table and the count is incremented if again there are more than one question.<BR>getting it?<BR>hope u can help me out in this<BR>thanx <BR>susy<BR>

  2. #2
    Ben Timby Guest

    Default RE: storing in the db at the end of the submission

    Just write the answers to the previous questions into hidden fields on each of the form pages:<BR><BR>page 1:<BR>&#060;input type=checkbox name=question1 value=answer1&#062;<BR>&#060;input type=checkbox name=question1 value=answer2&#062;<BR><BR>page 2:<BR>For Each Field In Request.Form<BR> Response.Write("&#060;input type=hidden name=" & Field & "value=" & Request.Form(Field))<BR>Next<BR><BR>if you need to put the questions into categories (topics) then name the field something like: "category&#124questionnumber", and split the field names on "&#124" to organize them, you could use a dictionary object for storing this info before inserting into your DB.<BR><BR>Just some ideas, HTH

Posting Permissions

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