303factory
Registered User.
- Local time
- Today, 22:38
- Joined
- Oct 10, 2008
- Messages
- 136
Hi
I've recently started changing all my code from ADO to DAO. I've noticed this causing some behaviour I dont understand with recordsets.
The strange thing is that every time rs.MoveNext is executed the rs.RecordCount increases by 1, and rs.EOF never happens. This is causing my code to fall over. Any idea why this is happening?
I've recently started changing all my code from ADO to DAO. I've noticed this causing some behaviour I dont understand with recordsets.
Code:
Dim rs As DAO.Recordset
strSQL = "SELECT * FROM tblExtensions
Set rs = CurrentDb.OpenRecordset(strSQL, dbOpenDynaset)
rs.MoveFirst
intCounter = 0
intArraySize = rs.RecordCount
If Not intArraySize = 0 Then ReDim strGetUserFiles(intArraySize - 1)
Do While Not rs.EOF
strGetUserFiles(intCounter) = rs.Fields("Extension")
intCounter = intCounter + 1
rs.MoveNext
Loop
Last edited: