How to count the records added to a table 
Author Message
 How to count the records added to a table

I use RunSQL to insert records to a table. I set system warning to False.
How can I record total number of records that had been added after insert
complete?

Thanks.

Marco



Mon, 01 Aug 2005 03:42:15 GMT  
 How to count the records added to a table
recBefore=Dcount("*","Tablename")
RunSQL "INSERT ..."
recAfter=Dcount("*","Tablename")
recAdded=recAfter-recBefore

or use Execute and RecordsAffected Property.

---
Serge Gavrilov



Quote:
> I use RunSQL to insert records to a table. I set system warning to False.
> How can I record total number of records that had been added after insert
> complete?

> Thanks.

> Marco



Mon, 01 Aug 2005 06:08:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Eliminate records of one table based on another table record count

2. need something like foreach record in table - add record to another table

3. Cannot add record to Visual Foxpro table after deleting all records in table

4. deleting records in a table and then adding new records

5. ADO2.5, can't add new record to an empty table using record binding

6. Checking if a record is duplicated before adding or during adding it to a table

7. Adding a record count to the datagrid control

8. Add Record Count to ALT property of IMG in a ASP

9. Record Count on a closed table

10. Dynamic Counter in a Table or a Query to Count Records (Q199679)

11. How to Simulate a Dynamic Counter in a Table or a Query to Count Records

12. Counting records in table

 

 
Powered by phpBB® Forum Software