Hi Bob.
>In my validation class, prior to getting the Properties for a table.field object, I want to be sure it exists so I don't raise an error message.
DBCXGetProp() won't give an error if lDebugMode is .F. -- it just returns .NULL. if either the object or the property don't exist.
>Is DBCFindObject the best way to go?
DBCXFindObject() is intended to position a DBC which is opened as a table to a particular record, so that won't really do what you want here.
>a DBCXIsObject() kind of thing would be nice.
There sort of is one, although I tend to just use DBCXGetProp() and see if it returns .NULL. You could call the FindObject() method of oCoreMgr. It expects the object name, type, and DBC to all be passed (ie. no empty parameters) and returns .T. if it found the object in COREMETA. Here's an example:
if oMeta.oCoreMgr.FindObject('customer', 'table', dbc())
* object exists
endif
Doug
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement