Главная страница | назад





Article #27757: How to create Interbase stored procedures that return parameters with TIBQuery.

QUESTION:

When I try to create my stored procedure using TIBQuery I get either EIBInterbaseError 'SQL error code = -104 Token unknown ... or EIBClientError 'XSQLDA index out of range'. How do I create a stored procedure in Delphi using IBX?

ANSWER:

    Most likely your stored procedure is returning parameters. If this is the case then you will need to do two things to your IBQuery. The first is to set ParamCheck to false. The second is to clear out the Params property. Assuming that your stored procedure is legal the code to create the stored procedure might look like this in Delphi:

procedure TForm1.Button1Click(Sender: TObject);
begin
IBQuery.Params.Clear;
IBQuery.ParamCheck := False;
IBQuery.ExecSQL;
end;

Last Modified: 16-SEP-01