Page 1 of 1

Problem with TSQLStoredProc in Delphi xe

Posted: Fri 10 Dec 2010 10:01
by einarst
Hi.
I have a problem with TSQLStoredProc .
I am using Oracle 10g, windows 7, Delphi XE and dbExpress 4.7.23
if I execute procedure in oracle database with Boolean parameter then Delphi throw an error
“dbExpress driver does not support TDBXType.BOOL Data type. Vendor error message: ORA-01403: no data found”
If I execute procedure with Boolean out parameter then I get this errors
“ORA-01403: no Data found”
If use number as parameter in procedure then I get this error
“Ora-06502: PL/SQL: numeric or value error: Character to number conversion error Ora-0612: at line 1.”
It is ok to use number as out parameter in procedure.

Thank you Einar

Problem solve

Posted: Fri 10 Dec 2010 11:50
by einarst
Wrong driver

Thanks Einar

Posted: Wed 15 Dec 2010 12:50
by bork
Hello

Please select the "DevartOracle" driver in your SQLConnection and check the following code:

Code: Select all

begin
  SQLConnection1.Execute('CREATE OR REPLACE PROCEDURE proc_test_bool (in_param IN BOOLEAN, out_param OUT BOOLEAN) ' + #13 +
                         'AS ' + #13 +
                         'BEGIN ' + #13 +
                         '  out_param := in_param; ' + #13 +
                         'END;', nil);

  SQLStoredProc1.SQLConnection := SQLConnection1;
  SQLStoredProc1.StoredProcName := 'proc_test_bool';

  SQLStoredProc1.ParamByName('IN_PARAM').Value := true;
  SQLStoredProc1.ExecProc;
  ShowMessage(VarToStr(SQLStoredProc1.ParamByName('OUT_PARAM').Value));

  SQLStoredProc1.ParamByName('IN_PARAM').Value := false;
  SQLStoredProc1.ExecProc;
  ShowMessage(VarToStr(SQLStoredProc1.ParamByName('OUT_PARAM').Value));
end;
It works correctly with the BOOLEN Oracle data type.