🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #11049

Re: Problem with procedure

#11049
From: Gon�alo Martins
Date: Tue, 17 Dec 2002 17:31
70 lines
2978 bytes
Martijn, thanks. It was a problem with the checkParam (never thought of
that).
Thanks a lot.
Best Regards

Goncalo

"Martijn Tonies" <m.tonies@upscene_remove.com> wrote in message
news:3dff5dc1@newsgroups.borland.com...
> Hi,
>
> > Hello all. I've create the following procedure in IBConsole and runned
ok.
> > Here's the procedure
> >
> > SET TERM !!;
> > CREATE PROCEDURE UPDATE_TARAMEDIA
> > AS
> > DECLARE VARIABLE CHAVE INTEGER;
> > DECLARE VARIABLE TARA NUMERIC(8,2);
> > BEGIN
> > FOR
> > SELECT TARAMEDIA,CHAVE_LOTE FROM LOTE INTO :TARA, :CHAVE
> > DO
> > UPDATE AMOSTRA SET TARAMEDIA=(:TARA) WHERE CHAVE_LOTE_TME=(:CHAVE);
>
> Where did you read the (:variable) syntax? Simple using :varname would do
it.
>
> > EXIT;
> > END !!
> > SET TERM !!;
> >
> > This works fine.
> > I'm trying to do this in Delphi running an IBSQL query.
> > First, the
> > SELECT TARAMEDIA,CHAVE_LOTE FROM LOTE INTO :TARA, :CHAVE
> > gives an error on the INTO. If I take the : before the variables it runs
> > fine.
>
> What are you running, the CREATE PROCEDURE? If so, do you set
> ParamCheck to False?
>
> > Second I run the query and it's ok, but when commit the transaction I
get
> > this error:
> > invalid request BLR at offset 99 undefined message number
> >
> > Any tips? I'm kind of lost here...
> >
> > Ah, one last thing. If I replace the SET TARAMEDIA=(:TARA) with SET
> > TARAMEDIA=10 it works!!! the problem is in the variables.
>
> There's no problem with variables - there's a problem with your code.
>
>
> --
>
> With regards,
>
> Martijn Tonies
> InterBase Workbench - the developer tool for InterBase & Firebird
> Firebird Workbench - the developer tool for Firebird
> Upscene Productions
> http://www.upscene.com
>
> "This is an object-oriented system.
> If we change anything, the users object."
>
>
Technical Details
Message-ID: <3dff5f7e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!proxad.net!proxad.net!fr.usenet-edu.net!usenet-edu.net!bnewspeer01.bru.ops.eu.uu.net!emea.uu.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3dff5a70$1@newsgroups.borland.com> <3dff5dc1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,6a55799dfde6a31c
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-12-17 09:42:17 PST
From: "Gon�alo Martins" <gmartins@netcabo.pt>
Newsgroups: borland.public.interbase.sql
References: <3dff5a70$1@newsgroups.borland.com> <3dff5dc1@newsgroups.borland.com>
Subject: Re: Problem with procedure
Date: Tue, 17 Dec 2002 17:31:45 -0000
Lines: 72
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 212.18.170.84
Message-ID: <3dff5f7e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1040146302 212.18.170.84 (17 Dec 2002 09:31:42 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!proxad.net!proxad.net!fr.usenet-edu.net!usenet-edu.net!bnewspeer01.bru.ops.eu.uu.net!emea.uu.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail