Copy recordset

Dear all,

I hava a method that have 2 inbounds (a recordset and a integer)

I open the recordset and search this number and call the same method with the recordset and a new integer value.

The problem is that when i’m moving in the recordset i’m moving in all previous recordset (that are the same)

I need to clone this recordset to do all the operations.

Can someone help me.

ItemsOnmenu(rs as RecordSet, MenuCode as integer, Menu as WebMenuItem) as WebMenuItem

while not rs.EOF
if rs.IdxField(2).IntegerValue <> 0 and rs.IdxField(1).IntegerValue = MenuCode then
Dim Objeto as WebMenuItem

  Objeto = CreateItem(rs.IdxField(3).StringValue,rs.IdxField(5).StringValue)
  Objeto = ItemsOnMenu(rs,rs.IdxField(4).IntegerValue,Objeto)
end if

rs = nil
return Menu

Which database? MoveFirst is not supported in all databases. My recommendation would be to create a class that has properties for each value in the record. Then create a class object for each record and append it to an array. Use that array in your code instead of the recordset.