Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DBCX question
Message
 
À
04/07/2000 06:09:48
Andrew Ducker
Financial Property Software
Stirling, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Stonefield
Titre:
Divers
Thread ID:
00387995
Message ID:
00388019
Vues:
19
If you look in the manual under How DBCX Extends a Database it shows an example of this - I think it's something to do with codeBook standards, or summink like dat.

Does nip yer heid a bit though if you're not expecting it.

Here's the text (my italics):-

You can find the value of a given extended attribute for any database object by calling the DBCXGetProp() method in DBCXMgr. You specify the name and type of the object (similar to how you specify it to the VFP dbgetprop() function) and the name of the property you wish to obtain. The property name can either be the “long” name of the property or the prefix for a given manager and the name of the field the property is stored in. For example, to get the Caption property, which is stored in the cCaption field of the Core Properties manager’s table (which has a prefix of CB), for the CUSTOMER table, use either:
? oMeta.DBCXGetProp('customer', 'Table', 'Caption')
or:
? oMeta.DBCXGetProp('customer', 'Table', 'CBcCaption')
DBCXGetProp() looks in the DBCXPROPS cursor to see which of its manager objects maintains that property, then calls the DBCXGetProp() method of that manager to do the actual work. Typically, a specific manager won’t override the BaseMgr’s DBCXGetProp() method, because it’s pretty simple:
· Find the record in the meta data table for the object type and name.
· Strip the prefix off the property name to obtain the name of the field containing the desired attribute.
· Return the contents of that field.
Once a DBCXMgr method has been called specifying an object name and type, you can call other methods for the same object without having to specify the object name and type each time. For example, to change the Caption property for the same table, use:....



>Using DBCX, I put in the following two lines:
>
>ometa.dbcxcreateprop("ADNewProp","oCoreMgr","AndysNewProperty")
>? ometa.dbcxgetprop("property","table","ADNewProp")
>
>And it gave me the result .NULL.
>
>So (having spent 5 hours going through source code) I tried this instead:
>
>? ometa.dbcxgetprop("property","table","DNewProp")
>
>which works just fine.
>
>Now, why is it stripping off the first character before it does the search?
>And if this is the standard, why doesn't it add on an initial character when
>it creates the field?
>
>I'm awfully confused (and exasperated).
>
>Andy D
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform