>I am trying to access Visual FoxPro 5.0 tables from a VB 5.0 application and I have three questions:
>
>1. Can I reindex the database from VB?
>2. Can I pack and remove records marked for deletion from VB?
>3. I have written a stored procedure to generate an incremental index for new records in my tables. This procedure
>works well in VFP, but when I add records from VB it doesn't work at all. Why is this? I thought stored procedures were supported for external access as long as they didn't contain unsupported XBase commands, as specified in the VFP ODBC driver help file?
>
>Thanks,
>
>Brian Hartin
>MCI Telecommunications
>Brian.Hartin@MCI.Com
Brian, I found it.
Handling Deleted Records
When you delete a record from a dBASE table through your application, the record is marked as deleted in the table. The record isn't, however, removed from the table because dBASE doesn't recover deleted records until the table is compacted. Because you can't compact a dBASE table through Microsoft Jet, you must compact the dBASE database to physically remove the deleted records.
Although records marked for deletion aren't actually removed in the source database, they won't appear in your application because Microsoft Jet automatically filters out deleted records. If you want records marked for deletion to appear in your data set, you must set the Windows Registry Deleted value in the \HKEY_LOCAL_MACHINE\SOFTWARE\
Microsoft\Jet\3.5\Engines\Xbase key to False. Then, you must restart the application that uses Microsoft Jet to reflect the record deletions.
I hope it help you.
Gerardo
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only