Regarding Accessing External database using MS-Access and MS-Visual Basic 
Author Message
 Regarding Accessing External database using MS-Access and MS-Visual Basic

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
Foxpro Database.
Deleted Records:
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
database.
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
database.
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.




Sat, 16 Sep 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. PLease someone help me, editing fields in Access database using MS Visual Basic 5.0

2. Using MS Access database with Visual Basic 5

3. Visual Basic, Access Basic or MS-Access??

4. Visual Basic, Access Basic or MS-Access??

5. MS Visual Basic -> MS Access via ODBC

6. CA-Prog Analyst, MS SQL Server, Visual Basic and MS Access

7. How can I attach External MS-Access Tables to MS-AccessDatabases

8. Using MS Access objects with Visual Basic 5

9. question reg. MS-Access database access using VB3

10. accessing MS access database using VB&CGI

11. ADO using MS Access with mdw system database for pw-access

12. Can I use VBA to manipulate external MS-ACCESS database

 

 
Powered by phpBB® Forum Software