Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

relationships in free tables..

Status
Not open for further replies.

psteja2000

Programmer
Feb 1, 2005
82
US
Hi,

I am like one day old in vfp. All I have worked on oracle,mssql,mysql,access before, never on a foxpro db.

I have a folder of .dbf and .cdx. I have vfp on my machine. I don't have the .dcx(?)file which stands for a database.

So I guess I have to use the free tables option. Now, what do I do if I want to view/modify any relationships between the (free)tables?

Any help is greatly appreciated..

regards,
Teja
 
Teja,
You'll either have to add this table (and the other(s)) to a Database (.DBX), or maintain your relationships in code. See the Help file for SET RELATIONSHIP TO (and SET ORDER TO!).

Rick
 
Teja,

Welcome to VFP, and to the forum. You wrote:

I don't have the .dcx(?)file which stands for a database.

First, there are three files that make up a database. Their extensions are DBC, DBX and DBT. We generally refer to these collectively as a DBC, which stands for "database container".

The DBF files are individual tables, and the CDXs are files holding indexes.

If these are your own DBFs (not live files being used in an application), you can easily create a DBC and place the DBFs in it. You can do this in the project manager, or by typing CREATE DATABASE in the command window. Having done that, type MODIFY DATABASE to bring up the visual database designer. From there, you can use the Database menu to add tables to the database.

Given a DBC, it is easy to create relationships by dragging from one table to another. Note that you have to drag indexes (and drop them on other indexes) rather than fields.

I hope this is enough to get you started. When you need more details, come back.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Thanks rgbean and Mike,

I will work more on what you suggested and come back(god forbid), if I remain stumped still.

regards,
Teja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top