Link to home
Start Free TrialLog in
Avatar of dimensionav
dimensionavFlag for Mexico

asked on

How to combine information between DBF files

HI

We are dealing witn an old DOS system, the point is that we need to combine the information between two clipper DBF files.

Any idea how to do that?

Thanks in advance.
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

You didn't disclose so much about your data, so possible combinations are none or almost endless :-)

Clipper DBF files are compatible with many other software tools working in Windows environment. So you may simply open these DBFs in FoxPro, Visual FoxPro, dBase, or even Excel (but here I don't recommend to save any changes).

E.g. FoxPro or Visual FoxPro will probably support code page of your DOS DBF data and SQL commands to combine data from two or more DBF tables are in native language support.

So if you issue following commands in FoxPro Command window you'll see more:

USE <YourDBFileName1> ALIAS Tbl1 IN 0  && Open the first DBF
USE <YourDBFileName2> ALIAS Tbl2 IN 0  && Open the second DBF

SELECT * FROM Tbl1  && Select all records from the first table
SELECT * FROM Tbl2  && Select all records from the second table

etc.
To complete my information you may use open source project which is some kind of Clipper continuation. For more details see at http://www.harbour-project.org/ 

xBase languages have more such clones. Many xBase alternatives are listed e.g. here: http://fox.wikis.com/wc.dll?Wiki~VFPAlternatives~VFP
Avatar of dimensionav

ASKER

pcelba:
>You didn't disclose so much about your data, so possible combinations are none or almost endless :-)
Sorry, I wasn´t been so smart...ha

Let me explain a little bit more what I want to do:

There are a couple of databases with almost the same structure, something like this:

DB1: ID, NAME
DB2: ID, NAME, ADDRESS, EMAIL

I want to copy all the records from DB1 to DB2, it doesn´t matter that some fields like ADDRESS and EMAIL remain empty.

Thanks again.
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
pcelba:

Reading one of those links that you posted, I have seen that .net technology could be substitute of visual foxpro, considering that I am vb.net programmer do you know how to that ?

Thanks
What I mean is that after opening the database could be possible to manipulate it using any SQL sentence.
Sorry for my answer but I am not VB.NET programmer and I am not able to give you exact instructions how to open and manipulate data in VB, therefore my answers were pointing you to FoxPro (or other xBase language) which has perfect possibilities for local data manipulations. I know you could use ODBC data access in VB which supports SQL but that's all. You still have two options:

1) Wait a few months until I learn VB :-) (Seriously, I am preparing for C# and VB.NET it just now)
2) Ask the question about DBF data access here in VB.NET zone. The answer will come for sure.
I believe that your answer would be helpful. I will try foxpro so I will leave it as a responded.
thank you very much.
You are welcome!

Visual FoxPro is very good tool to manipulate local data. It is reasonable to have some basic knowledge about it. But it has roalty free Run-time which is the most probable reason why it is not product of the future.