Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

I have an access database where I have four tables that I have created by stripping data from dbf files to four catagories.Th way i do it now is this.
1. Manually import the dbf files to the database.
2. Running append query for each dbf file and appending the data to single table called "newjunodata".Then I run four macros to strip the data to tables.

I append the data by looking at the date of the last record and then append the data from that day onwards.I have to do this for each dbf file.
Can anyone please tell me how to
a) Import the dbf files to access
b) Append the needed data to the table
OR
c) Directly append the data from the dbf files to the access table at once

Thank you in advance
Posted

1 solution

If you link the DBF file from within Access rather than importing it you could then write your code to grab the information from the DBF file without needing to worry that it is in DBF format.

It's a bit ugly and brute force but it would work.

Oh ... please understand ... I'm thinking that you would link to a copy of the DBF that is stored in a location where the application could process the DBF to grab the updates. When you needed to re-run the application, you would simply copy the main DBF files into the location for processing ... so I wasn't suggesting linking directly to your primary DBF files that are being written to by your Clipper/xBase application.
 
Share this answer
 
v2
Comments
Janaka Medawala 5-Oct-11 0:14am    
Thanks for taking your time to reply.
But the issue I need solved is much more simpler.I just want to get data from a dbf file to an access database with a vb code.with sql statements like INSERT.
I dont want to import the dbf files to access if there is a way to directly append the dbf data to access table rather than opening the dbf file in access and running an append query.
If I can just append the dbf data directly through a vb code that is what I am looking for.
Please help me if you can.
Thank you
BHort 5-Oct-11 10:20am    
Well, what about using an ODBC connection to the DBF files? Using the Access ODBC driver to connect to the DBF database you should be able to again simply access the DBF file using SQL and ignore the fact that it's a DBF file. It wont be fast because you typically wouldn't have any indexes loaded but it would work.
Janaka Medawala 7-Oct-11 3:07am    
Thank you so much. But I am a beginner. Can you supply me the codes

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900