Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find all values in Display Library
Message
De
04/01/2018 03:58:04
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01656928
Message ID:
01656940
Vues:
53
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform