I would appreciate some help with this problem, pls!
I have code which adds a new record to a recordset and it is wrapped up in a loop.
I know the code I've got works (of a sort) as the first record always gets inserted but none of the rest of the records do. I was wondering if you can insert more than 1 record at a time, tho it seems daft to me that you cant.
My code is as follows:
set rst = createobject("ADODB.Recordset")
rst.Open "[Project Countries]", cnnSearch, 2,3, 2
For i=1 to 2
rst("Code") = 99999
rst("CreateID") = "hjames"
rst("Country") = request.form("Country")
set rst = nothing
ID is an autonumber field and it returns an ID for both sets of records so when it does that I assume it has inserted the second record but when I look in the table it isnt there and yet when I try inserting another records the one that gets inserted this time has the correct ID number, ie 1 more than the record that didnt get inserted, if you see what I mean. so I know it gets inserted at some point but then its almost like its deleted straight away and I dont understand why.
Any help greatly appreciated!!