RecordCount = -1 
Author Message
 RecordCount = -1

Hey there.

I was making a proggie, nothing hard, a DB cloner that connects to an SQL
server DB and clone the data on it to a Local MDB. Now, I used  ADO 2.5 and
it worked fine, until I decided to use a Data control, after this the
Recordcount property returns a -1 value, even when I'm sure it has data on
it, I thought it was because of the locks, but I have the same procedure
(for a different table) on the same Module, and it works well, I used it to
have a progress bar.

So... I wrote it and it was working well, I used adOpenStatic and
adLockPessimistic, but using the same method again A FEW LINES LATER, it
doesn't work

Anybody has any suggestion? this error is stupid.

Thanx
K'



Sun, 18 Apr 2004 06:30:42 GMT
 RecordCount = -1

Did you check what cursorlocation you're using ?
Client side cursor should give you the correct recordnumber.

--
Saludos, Jorge Jimenez, SICAD S.A., Costa Rica
(remove the obvious to send e-mail)

Quote:
> Hey there.

> I was making a proggie, nothing hard, a DB cloner that connects to an SQL
> server DB and clone the data on it to a Local MDB. Now, I used  ADO 2.5
and
> it worked fine, until I decided to use a Data control, after this the
> Recordcount property returns a -1 value, even when I'm sure it has data on
> it, I thought it was because of the locks, but I have the same procedure
> (for a different table) on the same Module, and it works well, I used it
to
> have a progress bar.

> So... I wrote it and it was working well, I used adOpenStatic and
> adLockPessimistic, but using the same method again A FEW LINES LATER, it
> doesn't work

> Anybody has any suggestion? this error is stupid.

> Thanx
> K'



Sun, 18 Apr 2004 13:04:14 GMT
 RecordCount = -1
Recordcount property doesnt work on ALL Cursortypes.

Try using ClientSide Cursor
Static Type
Lock BatchOptimistic

Cheers

Gregory A Jackson MCSD, MCT
Sr Software Engineer
800.com



Sun, 18 Apr 2004 06:38:34 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. DAO Recordcount vs. ADO Recordcount

2. Getting RecordCount From Joined Tables

3. Recordcount using stored procedure

4. RecordCount does work for Stored Procedure?

5. Returning recordcount from a stored procedure

6. ADOCE recordset recordcount

7. Create Cursors that support RecordCount with Stored Procedure

8. recordset recordcount

9. RecordCount?

10. ado returns 0 RecordCount!

11. recordset and recordcount problem [urgent]

12. Help: why can't I get RecordCount ?


 
Powered by phpBB® Forum Software