How to delete and count recordset 
Author Message
 How to delete and count recordset

Have you tried to refresh the recordset?

There is to be a lost of synchronisation between TblClient and DatClient.
If the refresh method does not work, try to assign one back to the other
and it should work.

Jean Claude

internet.fr>...

Quote:
>Hi,

>Here is the problem :

>Imagine that my table contains 3 records :
>When I delete one of the records and I try to count them I still
>get 3 as response.

>Here is my code :

>TblClient.movelast
>N=TblClient.recordcount -->N=3

>DatClient.Recordset.Delete -->I delete one of the record

>TblClient.movelast
>N=TblClient.recordcount -->N still = 3 instead of 2

>Please Help me..

>Thanks a lot.

>David (Paris)



Sun, 07 Nov 1999 03:00:00 GMT  
 How to delete and count recordset

Have you tried to refresh the recordset?

There is to be a lost of synchronisation between TblClient and DatClient.
If the refresh method does not work, try to assign one back to the other
and it should work.

Jean Claude

internet.fr>...

Quote:
>Hi,

>Here is the problem :

>Imagine that my table contains 3 records :
>When I delete one of the records and I try to count them I still
>get 3 as response.

>Here is my code :

>TblClient.movelast
>N=TblClient.recordcount -->N=3

>DatClient.Recordset.Delete -->I delete one of the record

>TblClient.movelast
>N=TblClient.recordcount -->N still = 3 instead of 2

>Please Help me..

>Thanks a lot.

>David (Paris)



Sun, 07 Nov 1999 03:00:00 GMT  
 How to delete and count recordset


Quote:
> Imagine that my table contains 3 records :
> When I delete one of the records and I try to count them I still
> get 3 as response.

> Here is my code :

> TblClient.movelast
> N=TblClient.recordcount    -->N=3

> DatClient.Recordset.Delete -->I delete one of the record

Add this line here :

  tblclient.requery

Quote:

> TblClient.movelast
> N=TblClient.recordcount    -->N still = 3 instead of 2

This should help, but I wonder why you use two different objects to access
the same data.

--
Ralf Hoffmann
RPH (at) ExperTeam.de

-------------
An economist is an expert who will tell you tomorrow
why the things he predicted yesterday don't happen today
-------------



Sun, 07 Nov 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to delete and count recordset

2. Deleting records from a recordset without deleting from the database

3. Counting Tables/Delete by Create Date

4. Count Specific Message & Delete

5. delete huge counts of records

6. Counting deleted records

7. Recordset.Fields.Count problem

8. Count values from field in ADO Recordset

9. Adodc - RecordSet - Record Count?

10. Recordset counting

11. Dynaset Recordset Count

12. Get count of records in any size recordset

 

 
Powered by phpBB® Forum Software