Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find all values in Display Library
Message
From
04/01/2018 03:58:04
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01656928
Message ID:
01656940
Views:
52
>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

It seems that the signature for the Display library in the Property field is 0h010033, so to get all the fields and then their tables...
LOCAL DBContainer AS String
LOCAL DBArea AS String
LOCAL VCX AS String

CLOSE DATABASES

m.VCX = "%XYZ%"
m.DBContainer = GETFILE("dbc")

USE (m.DBContainer) NOUPDATE
m.DBArea = ALIAS()

SELECT ParentId, ObjectName AS FieldName, ;
		CAST(STREXTRACT(Property, CHR(1) + CHR(0) + "3", CHR(0)) AS Varchar(254)) AS DisplayLibrary ;
	FROM (m.DBContainer) ;
	WHERE ALLTRIM(ObjectType) == "Field" AND STREXTRACT(Property, CHR(1) + CHR(0) + "3", CHR(0)) LIKE (m.VCX) ;
	INTO CURSOR FieldsWithDisplayLibrarySet

SCAN
	? ALLTRIM(FieldsWithDisplayLibrarySet.FieldName)
	SELECT (m.DBArea)
	GO FieldsWithDisplayLibrarySet.ParentId
	? " - in table", ObjectName
ENDSCAN
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform