Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find all values in Display Library
Message
 
 
To
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:
01656943
Views:
39
>>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
>
Hi, Antonio,

Your code works very well. Thank you very much.

I know that this field is populated from the Stonefield Database Toolkit and there must be a table in the SDT meta data that has these values. But I could not figure out which meta table has it. So, for now, your code will work.
"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
Reply
Map
View

Click here to load this message in the networking platform