|
-
Jun 14th, 2000, 08:00 PM
#1
Thread Starter
Junior Member
After setting a new recordset in ADO, I am attempting to find out how many records are in it by using the RecordCount property. Things haven't turned out as expected and after using a breakpoint in the code I discovered that the RecordCount value was set to -1.
Looking up MSDN Library, I have found that this value is set when the number of records cannot be determined. Does anyone have any ideas or likely scenarios that would lead to this.
The recordset is definitely open and according to MSDN Library, an error message would occur if it was closed. Why would the RecordCount property not be returned?
-
Jun 14th, 2000, 08:52 PM
#2
Addicted Member
This is related to the cursor type. The default is forward only. you need to change this when opening the recordset to any other type which supports record count.
HTH
Lenin
-
Jun 14th, 2000, 09:10 PM
#3
Thread Starter
Junior Member
Thanks, solved the problem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|