RETURN Type("GetPem(This.oData, This.cFKField)")
Oooh! I like this.
>>Does anyone know the speed impact of using Try/Catch statements in VFP code? My intuition says there must be some hit, but I'm just curious if anyone has any hard data or real world experience with quantifying the performance hit of using this???
>>
>>For instance, here is the defensive use of Try/Catch I am contemplating. It guards against cases where a property name does not exist on an object. This code will be called very frequently in my app, so I want to make sure it's as fast as possible, but I still need a safety net in case the property name is not on the object.
>>
>>
>>
>>Local lcFKDataType
>>
>>Try
>> lcFKDataType = Vartype(GetPem(This.oData, This.cFKField))
>>Catch
>> lcFKDataType = 'U'
>>Finally
>>EndTry
>>
>>Return lcFKDataType
>>
>>
>
>You can uses Type
>
>RETURN Type("GetPem(This.oData, This.cFKField)")
>