Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find all values in Display Library
Message
From
04/01/2018 19:40:11
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01656928
Message ID:
01656975
Views:
37
>Hi,
>
>When I modify structure in the VFP IDE I can see for some fields in the table, the value in the field Display Library. Since all my tables are in a DB container, is it possible to select from all tables in the container that have a value in this field (Display Library)? Or select all field where the value in Display Library contains a key word (e.g. "XYZ")?
>
>TIA

Hi Dmitry.
I know that Antonio gave you some code that accesses the DBC directly and extracts you answer, but it is possible to get your information another way.
Local laFields[1], laTables[1], lnField, lnFields, lnTable, lnTables, lcValue

Close Databases All
Open Database "D:\Program Files (x86)\Microsoft Visual FoxPro 9\Samples\Northwind\northwind.dbc"

Create Cursor ExtractedInfo (Table v(254), Field v(254), Value v(254))
Select 0

lnTables = Adbobjects(laTables, "TABLE")
For lnTable = 1 To M.lnTables
	Use (M.laTables[M.lnTable])
	lnFields = Afields(laFields)
	For lnField = 1 To M.lnFields
		lcValue = DBGetProp(M.laTables[M.lnTable] + "." + M.laFields[M.lnField, 1], "FIELD", "DisplayClassLibrary")
		If !Empty(lcValue)
			Insert Into ExtractedInfo Values (M.laTables[M.lnTable], M.laFields[M.lnField, 1], lcValue)
		Endif
	Endfor
Endfor
Use

Select ExtractedInfo
Browse
Obviously you'll need to open your own database rather than the NorthWind one.
If you want the class name as well as the library name then use DBGetProp with the name "DisplayClass" instead of "DisplayClassLibrary".

Ian
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform