• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 979
  • Last Modified:

RdoResultset :- Rowcount return -1

Hi,

I am using the rdoresultset, when I do a query and it return a rowcount. Why sometimes it has record in my resultset but the rowcount return "-1" to me??


Regs,
ms3756
0
ms3756
Asked:
ms3756
1 Solution
 
zoltixCommented:
Return error code(-1)
0
 
Éric MoreauSenior .Net ConsultantCommented:
You often receive -1 in the RowCount property wihout having any error codes. The reason to this is that VB didn't read all the resultset to determine how many rows are actually populating the recordset.

A common way of handling it is use the MoveLast then the MoveFirst method to force VB to read the entire resultset and then query the RowCount property but this operation can be long (depending on how many rows you have).

You can also check:

http://support.microsoft.com/support/kb/articles/Q151/8/15.asp?LNG=ENG&SA=ALLKB
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now