ASP form writing to multiple DB tables.

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default ASP form writing to multiple DB tables.

    I'm new to Access and ASP pages, but so far I have been doing OK.
    This one has me stumped.
    What I am trying to do is have an ASP form with several dropdown lists,
    all pulling the same data from an Access DB table.
    The goal is to allow the end user to make multiple selections, 1 from each
    dropdown
    and have the results written to another table.

    Sort of like this.

    tblChoices contains 3 entries. choice1, choice2, choice3.
    Form would have 3 drop down lists, each displaying the 3 choices from
    tblchoices.
    tblchoices will have more entries added by another form, that is why I don't
    just hard code it.

    choice1 choice1 choice1
    choice2 choice2 choice2
    choice3 choice3 choice3

    I want them to be able to give one selection from each column,
    then have the results written to tblResults.

    I just can't seem to get it to work. It works fine using only 1 dropdown,
    but
    any others added will not pull data from the DB.
    Maybe this is not even the correct way to do this, If you have a suggestion
    I am all ears. And while I am here, is there any way to have 1 form field
    write to more then 1 table and or record? (using an ASP webpage)




    Spinner Guest

  2. Similar Questions and Discussions

    1. update multiple records in multiple tables from one form
      hello I have been trying to run multiple update queries based on the data entered by user. Brief background: I am fetching data from various...
    2. Can one <form> submit data to multiple tables?
      Am I able to use a single form to write data to multiple tables in my database using php/mySQL?
    3. How do you delete a record form multiple tables
      I have a dbase that has about 30 tables in it. How can I delete a record out of all of the tables without doing 30 DELETE statements? Example:...
    4. writing db record to tables (wrapping and spanning rows)
      Hi, I have a dataset where each record contains a persons name and filename of their picture. I want to write a row of five names, then a row...
    5. Writing multiple sessions to DVD?
      I've got a new machine with a DVD burner, and I've never used the built-in burning features of OS X, so I'm wondering how it works. I'd like to...
  3. #2

    Default Re: ASP form writing to multiple DB tables.

    <%
    Set objRS = objConn.Execute

    If not objRS.EOF then
    arrResults = objRS.GetRows
    End If

    ' Clean up ADO objects here
    %>
    '
    '
    '
    <%
    If isArray(arrResults)
    For i = 1 to 3
    %>

    <select name="cbo_<%=i%>">
    <%For j = 0 to UBound(arrResults, 2)%>
    <option><%=arrResults(0,i)%></option>
    <%Next%>
    </select>
    <%
    Next
    End If
    %>

    HTH

    Cheers
    Ken

    "Spinner" <spinner@theweb.cor> wrote in message
    news:OLI46lNfDHA.2348@TK2MSFTNGP12.phx.gbl...
    : I'm new to Access and ASP pages, but so far I have been doing OK.
    : This one has me stumped.
    : What I am trying to do is have an ASP form with several dropdown lists,
    : all pulling the same data from an Access DB table.
    : The goal is to allow the end user to make multiple selections, 1 from each
    : dropdown
    : and have the results written to another table.
    :
    : Sort of like this.
    :
    : tblChoices contains 3 entries. choice1, choice2, choice3.
    : Form would have 3 drop down lists, each displaying the 3 choices from
    : tblchoices.
    : tblchoices will have more entries added by another form, that is why I
    don't
    : just hard code it.
    :
    : choice1 choice1 choice1
    : choice2 choice2 choice2
    : choice3 choice3 choice3
    :
    : I want them to be able to give one selection from each column,
    : then have the results written to tblResults.
    :
    : I just can't seem to get it to work. It works fine using only 1 dropdown,
    : but
    : any others added will not pull data from the DB.
    : Maybe this is not even the correct way to do this, If you have a
    suggestion
    : I am all ears. And while I am here, is there any way to have 1 form field
    : write to more then 1 table and or record? (using an ASP webpage)
    :
    :
    :
    :


    Ken Schaefer Guest

  4. #3

    Default Re: ASP form writing to multiple DB tables.

    Thanks.!
    I got it working now.

    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    news:eGnYK6NfDHA.2984@TK2MSFTNGP11.phx.gbl...
    > <%
    > Set objRS = objConn.Execute
    >
    > If not objRS.EOF then
    > arrResults = objRS.GetRows
    > End If
    >
    > ' Clean up ADO objects here
    > %>
    > '
    > '
    > '
    > <%
    > If isArray(arrResults)
    > For i = 1 to 3
    > %>
    >
    > <select name="cbo_<%=i%>">
    > <%For j = 0 to UBound(arrResults, 2)%>
    > <option><%=arrResults(0,i)%></option>
    > <%Next%>
    > </select>
    > <%
    > Next
    > End If
    > %>
    >
    > HTH
    >
    > Cheers
    > Ken
    >
    > "Spinner" <spinner@theweb.cor> wrote in message
    > news:OLI46lNfDHA.2348@TK2MSFTNGP12.phx.gbl...
    > : I'm new to Access and ASP pages, but so far I have been doing OK.
    > : This one has me stumped.
    > : What I am trying to do is have an ASP form with several dropdown lists,
    > : all pulling the same data from an Access DB table.
    > : The goal is to allow the end user to make multiple selections, 1 from
    each
    > : dropdown
    > : and have the results written to another table.
    > :
    > : Sort of like this.
    > :
    > : tblChoices contains 3 entries. choice1, choice2, choice3.
    > : Form would have 3 drop down lists, each displaying the 3 choices from
    > : tblchoices.
    > : tblchoices will have more entries added by another form, that is why I
    > don't
    > : just hard code it.
    > :
    > : choice1 choice1 choice1
    > : choice2 choice2 choice2
    > : choice3 choice3 choice3
    > :
    > : I want them to be able to give one selection from each column,
    > : then have the results written to tblResults.
    > :
    > : I just can't seem to get it to work. It works fine using only 1
    dropdown,
    > : but
    > : any others added will not pull data from the DB.
    > : Maybe this is not even the correct way to do this, If you have a
    > suggestion
    > : I am all ears. And while I am here, is there any way to have 1 form
    field
    > : write to more then 1 table and or record? (using an ASP webpage)
    > :
    > :
    > :
    > :
    >
    >

    Spinner Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139