how to retreive information from multiple tables ?

  • Thread starter Thread starter Mehbs
  • Start date Start date
M

Mehbs

I have a small program already written in VFP8. This program allows user to
enter start and end date. When user click ok, it starts from transaction
file and pick up the data which falls under the entered date. While picking
up the data, it also reads and gets the name and other information from the
master file. Since it is very easy to set the relationship by using
employee number in VFP, I can link files.

Suppose, I have 3 files: 1. Transaction files which has daily input. 2.
Master file which has employee name, address, salary info. etc. 3. is
employees benefit file.
All these 3 files have 1 common field/column call employee_number.

Can I set these files up while running the program like I can do it in
Visual foxpro or what is the best way to do this.

I want to grab the information from all the files for each employee and
before moving to the next record, I want to dump the information to an excel
file. 1 line for each employee.

Microsoft is getting rid of VFP and I am having some difficulty each time
when I try to make any modification so I thought I should move the program
to C#.

All the database is in Visual Foxpro 8.

Thanks.
 
Microsoft is getting rid of VFP and I am having some difficulty each time
when I try to make any modification so I thought I should move the program
to C#.

If you are migrating completely, to C#, I would make an export of the
database (probably it is possible to do this in a plaintext file with
separators).
While you are at it, it is also a good idea to make a conversion to
Unicode. You can load your export files with the StreamReader class,
which provides ways to read from legacy windows codepages.
When you have loaded your files, you can create DataTables which you
can programmatically manipulate. You can visualise the whole thing
with the DataGridView class. To read and write you can use binary or
xml serialization. As for the Excel dump: look for JET and ADO access
to excel files if you want to write and read without viuall cues for
the user, otherwise look for Excel automation with office interop (I
wouldn't recommend this, since it will give you a lot of trouble).
I know this sounds pretty general, but at least it is a starting
point. I think it more or less solves the question whether it is
possible and easy to do the migration. I think it is, .NET is IMHO
very powerful for this kind of stuff.

Regards,
Joachim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top