adding multiple records

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

  1. #1

    Default RE: adding multiple records

    Thanks Perry,

    I am not sure what :

    (" & (nBsae £« 1£ > © & " )")


    is as the characters are not normal?

    could you please repost, thank you very much
    >-----Original Message-----
    >You can use code as follows to add multiple records into
    your database:
    >
    >szSQL="SELECT * FROM tblTickets ORDER BY nID DESC"
    >set rsTemp2= objConn.Execute (szSQL)
    >dim nBase
    >nBsae = rsTemp2("nticket")
    >
    >objConn.Execute ("insert into tblTickets (nticket)
    values (" & (nBsae £« 1£
    >©& " )")
    >objConn.Execute ("insert into tblTickets (nticket)
    values (" & (nBsae £« 2£
    >©& ")")
    >objConn.Execute ("insert into tblTickets (nticket)
    values (" & (nBsae £« 3£
    >©& ")")
    >objConn.close
    >set objConn = nothing
    >
    >Best regards,
    >Perry Deng
    >Microsoft
    >
    >This posting is provided "AS IS" with no warranties, and
    confers no rights.
    >
    >.
    >
    Matt Guest

  2. Similar Questions and Discussions

    1. CF Multiple Queries, Multiple Records
      All, I've got three queries all passing variables from previous queries. The issues? The second query returns 4 records. I want to use IDs for...
    2. 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...
    3. adding multiple child records
      i have an access database set up with 2 tables: tblContacts, and tblNotes tblNotes is related to tblContacts by a field caled ContactID i have...
    4. adding records
      I have a particular form with a combo box on listing a set of data. I have created an add record button which when clicked clears all the othewr...
    5. Adding images to records
      How can we add images to records by programmaing? Assuming images are named sequentially. Babar
  3. #2

    Default RE: adding multiple records

    Hi Matt,

    Sorry, some characters become messy, so I paste it again:

    szSQL="SELECT * FROM tblTickets ORDER BY nID DESC"
    set rsTemp2= objConn.Execute (szSQL)
    dim nBase
    nBsae = rsTemp2("nticket")

    objConn.Execute ("insert into tblTickets (nticket) values (" & (nBsae £« 1)
    & " )")
    objConn.Execute ("insert into tblTickets (nticket) values (" & (nBsae £« 2)
    & ")")
    objConn.Execute ("insert into tblTickets (nticket) values (" & (nBsae £« 3)
    & ")")
    objConn.close
    set objConn = nothing

    Best regards,
    Perry Deng
    Microsoft

    This posting is provided "AS IS" with no warranties, and confers no rights.

    Perry Deng 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