Page 1 of 1

Accessing TOraParam as TParam returns different values.

Posted: Wed 28 Oct 2009 07:46
by a-s-z
Hi,

I have a problem using parameters in TOraQuery. When accessing the parameters as TParam, the value is not the same, i.e. accessing TParam(AParam).Value will return an other value than TOraParam(AParam).Value or TDAParam(AParam).Value!

I am using reflection in a custom component to get the parameter from a TDataSet reference.
How can I solve the problem without needing direct reference to Odac?

Posted: Wed 28 Oct 2009 09:17
by Plash
You can use the following code to call TOraParam.Value:

Code: Select all

GetVariantProp(Param, 'Value')

Posted: Wed 28 Oct 2009 12:04
by a-s-z
Thanks,

I have wrapped this functionality in a little class helper. Instead of calling Clear, I am assigning Null to Value. Is this correct, or do I have to call Clear?

Posted: Thu 29 Oct 2009 08:15
by Plash
Assinging Null to Value is the same as calling Clear.