Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine tables that have a certain field?
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01314228
Message ID:
01314239
Views:
8
>>>
>>>Open DBC as a table and run following query
>>>
>>>SELECT LEFT(db1.ObjectName,50) AS TableName, LEFT(db2.ObjectName,50) AS FieldName ;
>>>	FROM mydbc db1 JOIN mydbc db2 ON db1.ObjectId = db2.ParentId ;
>>>	WHERE db1.ObjectType = "Table" ;
>>>		AND db2.ObjectType = "Field" AND db2.ObjectName = lcFieldName
>>>
>>
>>Thank you, Sergey. I was just in the process of doing kind of the same, using LOCATE. Your approach looks much better.
>
>Without using DBC as a table you can loop through tables using ADBOBJECTS() function, but I think, this one is better and simpler, especially if it's needed not in a program.

This is an example of what I was telling you in the PM some time ago. Tact.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform