S
Sanjay Sangwan
Hi
I am expereincing difficulty in getting RecordCount of a
recordset generated with ADO. The code is like this
Private sub TESTONLY as integer
dim rst as new ADODB.recordset
rst.open "MYQUERY",CurrentProject.connection,
adOpenDynamic, adLockOptimistic
witt rst
.movefirst
.movelast
TestOnly =rst.Recordcount
end with
end sub
Every time the value returned is -1. I tried changing all
sorts of cursor property etc but no use. can you tell
what could be wrong. I have tested the recordset
generation which appears to be fine
Thanks in advance
Sanjay
I am expereincing difficulty in getting RecordCount of a
recordset generated with ADO. The code is like this
Private sub TESTONLY as integer
dim rst as new ADODB.recordset
rst.open "MYQUERY",CurrentProject.connection,
adOpenDynamic, adLockOptimistic
witt rst
.movefirst
.movelast
TestOnly =rst.Recordcount
end with
end sub
Every time the value returned is -1. I tried changing all
sorts of cursor property etc but no use. can you tell
what could be wrong. I have tested the recordset
generation which appears to be fine
Thanks in advance
Sanjay