link & stored procedures problem

Ivan Smahin ivan_smahin at paradigmasoft.com
Tue Mar 25 09:31:04 CDT 2008


Hello Steven,

Tuesday, March 25, 2008, 12:25:27 PM, you wrote:

> Hello all,

> I am having some problems with a stored procedure that needs to link some
> records.
> It fails on the line with the link statement, telling me that the closing
> bracket ')'
> after 'idtestresult' in the first link statement is an unexpected token :

> 11:18:58: Error: Kernel error: 0x71000. line 18:27: unexpected token: )


> ----------
> Create or replace procedure [sp_answer_question](
>         IN correct boolean, 
>         IN testId long, 
>         IN VraagID long, 
>         IN IdStudentTest long,
>         in gebruikerID long)

> BEGIN

>         declare idtestresult long;
>         declare idtestvraag long;

>         insert into test_resultaten (juist) values (correct);

>         set idtestresult = SELECT Last_RecID('lpserver') as id;
>         set idtestvraag = select id from testVragen where test_id=testId and
> vraag_id =VraagID;

>         link record (idtestresult) of test_resultaten 
>                 with record idtestvraag of testVragen 
>                 using link_test_resultaat_vraag;

>         link record (idtestresult) of test_resultaten 
>                 with record (IdStudentTest) of studenten_testen 
>                 using link_stud_test_resultaten;

> END
> ----------

> Am I doing something wrong, if so, what would that be?

Seems to be a bug - but you can try this workaround:

link record (select idtestresult) ...


-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list