Subject RE: [IBO] Re: TIBODataset and EXECUTE PROCEDURE with output parameters
Author Jason Wharton
> > If it were a TIB_Query you would not find the output from an
> > executable procedure in Params, but in Fields. Have you checked to
> > see whether this is the case with TIBOQuery? I'd have to set up a
> > test app myself to answer that question...
>
> Fields stay empty, only Params gets filled.

I setup a sample of how TIBOQuery is supposed to work using the sample
database indicated below. Anyone can try this at home...

object IBOQuery2: TIBOQuery
Params = <
item
DataType = ftString
Name = 'head_dept'
ParamType = ptInput
end
item
DataType = ftFloat
Name = 'TOT_BUDGET'
ParamType = ptOutput
end
item
DataType = ftFloat
Name = 'AVG_BUDGET'
ParamType = ptOutput
end
item
DataType = ftFloat
Name = 'MIN_BUDGET'
ParamType = ptOutput
end
item
DataType = ftFloat
Name = 'MAX_BUDGET'
ParamType = ptOutput
end>
DatabaseName = 'C:\Program Files\Common Files\Borland
Shared\Data\employee.gdb'
IB_Connection = IB_Database1
SQL.Strings = (
'execute procedure SUB_TOT_BUDGET( :head_dept )')
end

procedure TForm1.Button2Click(Sender: TObject);
begin
IBOQuery2.ParamByName( 'head_dept' ).AsInteger := 100;
IBOQuery2.ExecSQL;
ShowMessage( IBOQuery2.ParamByName( 'TOT_BUDGET' ).AsString );
end;


When I ran this it worked exactly as I suspected. It executed the procedure
and the answer was available in the parameter.


Not sure what more I can do to help as it appears IBO does just what I
expect it should.

Jason