Link to home
Start Free TrialLog in
Avatar of Luhana
Luhana

asked on

adodb.recordset recordcount return -1

hi
my record set did not return recount value always return -1

here is some code
set rs = new adodb.recordset
set rs = objhcon.execute (sSQL)
msgbox rs.recordcount

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can also try like this:

set rs = new adodb.recordset
rs.CursorLocation = adUseClient
rs.open sSQL, objhcon, 1, 1
msgbox rs.recordcount