Board index » delphi » Please help -- Stored Proc parameter passing.

Please help -- Stored Proc parameter passing.

We want to pass a Boolean data item as input parameter to a TADOStoredProc,
as follows:
    ADOStoredProc1.Active := False;
    ADOStoredProc1.Parameters.ParamByName('UnTieneAcceso').Value := True;
    ADOStoredProc1.ExecProc;

where the stored procedure is:

CREATE OR REPLACE PROCEDURE A_Test (ABoolParam in boolean) IS
  LocalVar    integer;
  begin
     if (ABoolParam) then
         LocalVar := LocalVar + 1;               -- Just to have something
in the procedure !!!!
     end if;
     commit;
  end;

When we perform the ExecProc we get an OleException. Why?

The database is Oracle 9i, Oracle OLEDB Provider, MDAC 2.7, Delphi 7.

Anyone know what is wrong??? or must we pass all boolean parameters as
integers using values 0 for false and 1 for true and then decoding within
the stored procedure ???

We need help on this one:            Jim Fleming

 

Re:Please help -- Stored Proc parameter passing.


Hi!

Maybe I'm completely wrong, but i saw a strange behavoir on Parameters with
TADOQuery:
As long as you have no connection-entry for this query, no parameters are
accepted.
Maybe you should connect your Proc to the O9i-DB before stating your
procedure.

Hope this helps.

Frank

Re:Please help -- Stored Proc parameter passing.


Of course, the TADOStoredProc has its Connection property set to the
ADOConnection object, and that object has its Connected property TRUE!!! I
omitted to state that, as I thought it was superfluous !!!!!

Other Threads