deleting records from a Foxpro database 
Author Message
 deleting records from a Foxpro database

I'm trying to delete records from a Foxpro / dBASE III database table.  From
Visual Basic I'm executing the SQL statement:
"DELETE FROM sttable WHERE classnum = '1'"

(sttable is a FoxPro / dBASE III database table.)

However, this is simply marking the records as deleted.  It doesn't
"pack" the database; that is, it doesn't erase the records from the file,
it just marks them deleted.  I need to also "pack" the database, meaning
flush out the deleted records.  Do you know of any way to do this in a
SQL statement?



Fri, 22 Jan 1999 03:00:00 GMT  
 deleting records from a Foxpro database

Quote:

>I'm trying to delete records from a Foxpro / dBASE III database table.  From
>visual basic I'm executing the SQL statement:
>"DELETE FROM sttable WHERE classnum = '1'"

>(sttable is a FoxPro / dBASE III database table.)

>However, this is simply marking the records as deleted.  It doesn't
>"pack" the database; that is, it doesn't erase the records from the file,
>it just marks them deleted.  I need to also "pack" the database, meaning
>flush out the deleted records.  Do you know of any way to do this in a
>SQL statement?

In your app.ini file you have to have
[dBase ISAM]
deleted = ON

Then do a simple SQL :
"Select * into Table_New from Table_Old"

Kill Table_Old
Name Table_New, Table_Old


http://www.xnet.com/~kd9fb



Sun, 24 Jan 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Foxpro database (Deleted Records)

2. How Do I NOT Display deleted records using FoxPro 2.5 Database

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

4. Foxpro Deleted Records

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

6. Handling A deleted Foxpro Record

7. Cannot delete record on FoxPro 2.5 DB

8. Accessing Foxpro dbf - deleted records

9. Deleted Records Under FoxPro 2.6

10. FoxPro ODBC Driver Shows Deleted Records

11. delete records in Foxpro

12. delete records in foxpro

 

 
Powered by phpBB® Forum Software