Deleting multiple records from a table 
Author Message
 Deleting multiple records from a table

Hi,

I am connecting to an Access table using a data bound grid, and I need to be
able to delete multiple records (all records in fact) from the table.  Does
anyone know how to do this?   I have it set up now to delete records one at a
time, but I would like to clear all the records out of the table whenever
anyone quits from the program.

Thanks in advance

ivy



Sat, 05 Feb 2000 03:00:00 GMT  
 Deleting multiple records from a table

Quote:
>Subject: Deleting multiple records from a table

>Date: Tue, 19 Aug 1997 21:13:12 GMT

>Hi,

>I am connecting to an Access table using a data bound grid, and I need to
be
>able to delete multiple records (all records in fact) from the table.
Does
>anyone know how to do this?   I have it set up now to delete records one
at a

>time, but I would like to clear all the records out of the table whenever
>anyone quits from the program.

>Thanks in advance

>ivy

Here it is:

<yourDatabase>.Execute " Delete * from <yourtable>" dbfailonerror

this is much faster than steping through the table/dynaset

George



Sun, 06 Feb 2000 03:00:00 GMT  
 Deleting multiple records from a table

It sounds to me like you could run a query to select all the records you
need and connect your datacontrol to that instead.  Then you won't have to
delete all records from what appears to be a temporary table.  So set your
Data1.RecordSource = "Select * From ..."
--
Lance King
Work: 770-801-4502

Take out "nospam." to send message.



Quote:
> Hi,

> I am connecting to an Access table using a data bound grid, and I need to
be
> able to delete multiple records (all records in fact) from the table.
Does
> anyone know how to do this?   I have it set up now to delete records one
at a
> time, but I would like to clear all the records out of the table whenever
> anyone quits from the program.

> Thanks in advance

> ivy



Sun, 06 Feb 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. deleting records in multiple tables

2. Deleting Records From Multiple Tables

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

4. Deleted records when text file is linked as table (#deleted)

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

6. Deleting multiple records at once from dynamic dataset

7. Delete multiple record (Query)

8. Delete multiple record (Query)

9. Delete multiple records from disconnected recordset

10. Delete multiple record (Query)

11. Delete Multiple record

12. Deleting multiple records?

 

 
Powered by phpBB® Forum Software