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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table path in DBC

Status
Not open for further replies.

Nro

Programmer
May 15, 2001
337
CA
Hi.
My question is quite simple, but I can’t find any information on that.

I have one customer table (call it c:\test\cust001.dbf) and one address table (c:\test\cust002.dbf). The two tables are referenced in my INVOICE.DBC as custMain and custAddr respectively. I want, by reading the .DBC only, to find the real name and full path of each table for the alias custMain and custAddr.

VFP 9.0 SP2

Thanks in advance

Nro
 
Nro,

This is quite easy. The information you need is contained in the Properties field for each of the tables within the DBC. You need to open the DBC as a table, browse it, locate the rows for the tables in question (by looking at ObjectName and ObjectType), then open the Properties memo field and look for the file names and paths.

Actually, it's slightly more difficult that than, as the relevant names will be embedded in a bunch of binary data, but it should be fairly obvious when you do it.

For an example, including a screen shot, see my article, "Fixing broken backlinks in DBC and DBF files", at
Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Hello Mike

Thanks again for the quick answer.
In my previous message, I forget to tell that I tried this

Code:
DBGETPROP("custMain","TABLE")

the third parameter was missing...

Code:
DBGETPROP("custMain","TABLE","PATH")

Now it’s OK, it's giving me the name of the table.

Thanks again.

Nro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top