insert multipe records at once how_URGENT

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • r_o
    New Member
    • Jul 2006
    • 35

    insert multipe records at once how_URGENT

    i'm developping a web application with an access database

    in my application there's a loop that gets values of a form
    like:

    lastElt=request ("numberOfItems ")
    for i=0 to lastElt
    qty=request("qt y" & i )
    desc=request("d esc" & i )
    objConn.execute ("insert into items values(" & qty & " , ' " & desc & " ' )" )
    next

    and i have to insert like 12-15 records
    is there a way to insert them at the same time like a batch operation, or something instead of accessing the database multiple times

    well im using a stored procedure that does the insert but i f there's a way to batch-insert that can be done with a recordest object or whatever i'll take it

    need code PLEASE!!

    another isuue:

    i need to insert a row into a table whose PK is an autonumber and then get the PK value. I'm using aq stored procedure to do the insert and then the @@IDENTITY method to get this value(PK)
    my question is : if there were 2 or more users executing the page at the same time, can user1's inserted PK be seen by user2
    ie. 2 ADO connections here , the @@IDENTITY does it depend on the connection calling it or does it retrieve the last inserted PK value no matter who or what connection did the insert or does a it return the value last inserted by the ADO connection issuing the @@IDENTITY call
Working...