SetVariable and Variants.

Speed

Member²
I need to set the value of a field in a table without knowing what type of field it is, but there is no otVariant type for DeclareVariable.

How can I set the value of a field using a variant? :confused:

Thanks.

Regards,

Steve
 
The fields are generally either Number or VarChar2, so I'm declaring the variable as an otString and then passing the value using VarToStr. Not sure if this is the right way to do it but it seems to work ok.

Regards,

Steve
 
That is probably the best way to go. A string is the closest thing to a variant in Oracle. If the numbers include decimals, make sure that the decimal point matches the Oracle NLS settings.
 
Back
Top