🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Problem with procedure

#11046
From: Gon�alo Martins
Date: Tue, 17 Dec 2002 17:10
35 lines
1913 bytes
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);
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.
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.

Thanks

Goncalo
Technical Details
Message-ID: <3dff5a70$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,6a55799dfde6a31c,start
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-12-17 09:15:24 PST
From: "Gon�alo Martins" <gmartins@netcabo.pt>
Newsgroups: borland.public.interbase.sql
Subject: Problem with procedure
Date: Tue, 17 Dec 2002 17:10:11 -0000
Lines: 38
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: <3dff5a70$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1040145008 212.18.170.84 (17 Dec 2002 09:10:08 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail