How to insert multiple records to the same table with a multi-fields form

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

  1. #1

    Default How to insert multiple records to the same table with a multi-fields form

    Hi all,
    is it possibile to insert multiple records in the same table?

    I imagine to build a multi-rows form, with the same number of fields per
    row and, pressing the button, to insert all the data in the db table.

    The db is Access.

    How to do it?

    Thanks
    PGei


    PiGei Guest

  2. Similar Questions and Discussions

    1. multi-table insert in Oracle 9i
      Could someone please tell me what am I doing wrong that causes both of the following multi-table insert statements to fail with a "missing key"...
    2. Insert Multiple form records into DB
      I have a form that populates with data from several queries and calcs, it creates about 70 rows of form data. I need for the form fields to be...
    3. insert multiple records with ASP.NET
      Ok, I have seen the question asked, yet have not seen any answers. I know how to insert multiple records with .asp, but how would I do it with...
    4. Login - multi table insert for registrant; subsquent login insert page requests into joined 'Selection' Table
      Question regards insert and updates in sql server for a simple login script that requires registration the first time and only "email address" upon...
    5. How to determine multi records entered on the web form
      Hello, I have a classical ASP web data entry form with 20 rows that allows users to enter multiple records at once, my questions are: a.. How...
  3. #2

    Default Re: How to insert multiple records to the same table with a multi-fields form

    The easiest thing would be to have the fields with the same name, and ending
    with the row number

    id1, name1, address1, city1, state1
    id2, name2, address2, city2, state2
    id3, name3, address3, city3, state3 etc...

    then a hidden field telling you how many rows ...

    hidden field called totalRows

    then on your results page just do a update for each row

    for n = 0 to CInt(Request.Form("totalRows")
    yourSQL = your update statement where id = Request.Form("id" & n)
    '// and the values are the form name with n for the number

    next

    I hope this helps point you in the right direction.

    I will be creating a grid here shortly and putting it on my site ... it will
    be a couple months though, for I am building some other open source things
    first.

    --
    Brynn
    [url]www.coolpier.com[/url]

    *****
    I reply and post to this newsgroup in an attempt to help other users.
    I in no way guarantee the effects of scripts posted ...
    and sometimes post partial scripts, untested to point users in the right
    direction.

    ALWAYS test my and everyone elses scripts before use ... duh ;)
    *****
    "PiGei" <james_milanNOSPAM@hotmail.com> wrote in message
    news:%23AZ9cgV8DHA.4060@tk2msftngp13.phx.gbl...
    > Hi all,
    > is it possibile to insert multiple records in the same table?
    >
    > I imagine to build a multi-rows form, with the same number of fields per
    > row and, pressing the button, to insert all the data in the db table.
    >
    > The db is Access.
    >
    > How to do it?
    >
    > Thanks
    > PGei
    >
    >

    Brynn 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