Click here to Skip to main content
15,917,862 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

In a interview, they have asked me a question.
If Recordset.count returns -1 value then what it means.
I dont know the answer for this. Kindly any one provide me a solution.
Posted
Comments
[no name] 11-Oct-12 11:09am    
There is no "solution". -1 generally means no rows were affected.
[no name] 11-Oct-12 11:15am    
If you are talking about a DAO Recordset, then a -1 means that you have not moved the pointer so it does not know how many records are contained yet. AFAIK, been a long time since I saw one.
Maciej Los 11-Oct-12 13:24pm    
My virtual 5!

1 solution

Recordset.RecordCount property (ADO)
The RecordCount property will return -1 for a forward-only cursor; the actual count for a static or keyset cursor; and either -1 or the actual count for a dynamic cursor, depending on the data source.


More at:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms676701%28v=vs.85%29.aspx[^]
http://msdn.microsoft.com/en-us/library/office/ff821452.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900