Subject Re: How to execute Stored Procedure code directly from Delphi ?
Author Mario
Your suggestions were spot-on. The problem with Column Unknown error
was in the header : (using incorrect data type REAL instead of FLOAT).
It was also necessary to set the ParamCheck to False, as suggested by
Nando.
Big thanks to both Helen and Nando for your help.
Cheers,
Mario

--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 01:44 PM 15/07/2005 +0000, you wrote:
> >With ParamCheck set to False, the error code is now -206 Column
unknown.
> >I have also tried to run it with all statements between the begin and
> >end keywords temporarily removed and with ParamCheck set to True. In
> >that last case, it crashes on the last line: -104 Token unknown - line
> >5,char -1 End'.
>
> The Column Unknown error is probably coming from the argument
declarations
> in the header. See comment below.
>
> Is this an InterBase or Firebird 1.0 database? If so, BEGIN END
won't be
> accepted - for a dummy block you will need to include a comment
statement.
>
>
> >as in:
> > > Transaction.StartTransaction;
> > > SQL.Clear;
> > > SQL.Add('ALTER PROCEDURE GETSTDDEV(FIRSTDATE TIMESTAMP)');
> > > SQL.Add('RETURNS(AVGINDEX REAL,COUNTINDEX INTEGER,STDDEV REAL)');
>
> Didn't notice this before. There is no data type REAL. Use DOUBLE
> PRECISION or FLOAT if you want a floating-point type; otherwise use a
> NUMERIC or DECIMAL type with the appropriate precision and scale.
>
> > > SQL.Add('AS');
> > > SQL.Add('Begin');
> > > SQL.Add('End');
> > > ExecQuery;
> > > Transaction.Commit;
>
> All yours, Nando. I'm off to bed. :-=?