Hi,
i am trying to create a stored procedure with TQuery, but the code is resulting in the Token Unknown error pointing to the ':' used in the sql.add statement. This same procedure as it is is working fine when directly executed with the SQL Explorer of the INTERBASE(i am useing interbase as my application database), the code snippet is as follows:
stnquery.active := false;
stnquery.SQL.clear;
stnquery.SQL.Add('create procedure sample2(invar varchar(15))'+
' as '+
' declare variable v_coggnr varchar(15);'+
' begin '+
'select signo from tocdsignal76 where signame like :invar into :v_coggnr;'+
'insert into temp(attr1) values(:v_coggnr);'+
' end');
stnquery.Open;
stnquery.ExecSQL;
The code when complied is giving error at the : given in the select statement,(:invar refers to input variable and :v_coggnr refers local var. (interbase procedure)) can any one help me out this.
thanxs in advance,
vj.