Boolean Variables

Is there any possibility to receive boolean values in OracleQuery's (something like "otBoolean").

Example in BCB5:
bool bResult = false; oquGeneric->DeclareVariable("function_result",otBoolean);
oquGeneric->SQL->Text = "";
oquGeneric->SQL->Add("BEGIN ");
oquGeneric->SQL->Add(" :function_result := MCONTROL; ");
oquGeneric->SQL->Add("END;");
oquGeneric->Execute();
bool = oquGeneric->GetVariable("function_result");

Greetings
JS
 
The boolean data type cannot be used directly. You can translate it to an integer by using the standard sys.diutil.bool_to_int function:

:function_result := sys.diutil.bool_to_int(MCONTROL);

This will translate from True/False/Null to 1/0/Null.

------------------
Marco Kalter
Allround Automations
 
Back
Top