Hi from Srinivas
I have a problem when I have an attached a table from an external
Database(foxpro version 2.6 for Dos,*.dbf) to Access 2.0 database.I am
using Visual Basic on Windows-95.
I need to Delete or Update records in the external Database(Attached
Table) and want to reflect those changes in the attached table (i.e in
Access) using Visual Basic.
There are two ways of doing it.
1) Use a Tabledef object(Visual Basic) to create a attached table in
Access and then carry out necessary actions like Delete or Update on the
External table. But this Tabledef is Readonly and not letting me to
Delete or Update the attached External table.
This is the help in VB about deleting records for a Externally attached
In most cases, if you Delete a record when working with External data,
the record is actually removed from the source table. When working with
FoxPro tables, however, Deleted records aren't actually removed until
the table is packed using FoxPro commands or utilities. The Jet
engine's CompactDatabase method of the DBEngine object works only on Jet
Databases; it has no effect on Microsoft FoxPro Databases.
You can tell the Jet database engine not to include deleted records by
setting the Deleted parameter of the initialization settings to True.
If you set the Deleted parameter to False, all records are included in
any Recordset objects you create, even deleted records.
I tried this by setting the Deleted Parameter = true in the
MsAccess20.ini(in windows directory)
I then opened the Access database and checked the external table. But
still I dont have the most recent or refreshed view of the external
This didnt work.
2) Use the OpenDatabase directly on the external database using the
Connect string and then open a Recordset and then carry out necessary
actions like Delete or Update on the External Table.
But still I dont have the most recent or refreshed view of the external
It works only when I open the Foxpro Database (version 2.6 for Dos) and
Pack and Reindex it.
Could someone suggest me is there any other way to get around this
problem.Should the external Database opened in Exclusive mode for action
related Queries(Delete or Update)
Which is the better method using Tabledef method or OpenDatabase method.