I have the following code

vb Code:
  1. Do Until i = rs_dao.Fields.Count
  2.  
  3. Do Until rs_dao.EOF
  4. If i = 0 Then
  5. rs.AddNew (rs.Fields(0).Name), (rs_dao.Fields(0).Value)
  6. Else
  7. rs.Update (rs.Fields(i).Name), (rs_dao.Fields(i).Value)
  8. End If
  9.  
  10. rs.MoveNext
  11. rs_dao.MoveNext
  12.  
  13. Loop
  14.  
  15. i = i + 1
  16. rs.MoveFirst
  17. rs_dao.MoveFirst
  18.  
  19. Loop

rs - SQL Server recordset

rs_dao - Access recordset

All columns work fine apart from the first one on the rs.AddNew. It's not in order, i.e 1 - 10. But the other rs.Update columns are fine and in order

The rs database is a blank one so the inital row will have to be added through the AddNew function.

Im using SQL Server 2000, I noticed that if I toggle the NULLs on in the SQL table design and then run it works fine. I do it again and it doesn't. Then if I toggle the NULLs off again it'll work perfectly for the first time only.

Any ideas?