SQLProcessor pbm

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
akli_agha
Junior Boarder
Junior Boarder
Posts: 41
Joined: 08.01.2008, 20:35

SQLProcessor pbm

Post by akli_agha »

Hi,

I wrote an SQL script which works fine on IBExpert but when I tried to execute it under an SQLProcessor, I had this error :
Invalid request BLR at offset 291 bad parameter number.

I'm using Zeos 6.6.2, Firebird 2.0.3 and D7.

An idea about this message ?? Thanks.
gto
Zeos Dev Team
Zeos Dev Team
Posts: 278
Joined: 11.11.2005, 18:35
Location: Porto Alegre / Brasil

Post by gto »

hum! and your SQL script, can you post it? ;)
Use the FU!!!!!IN Google !

gto's Zeos Quick Start Guide

Te Amo Taís!
akli_agha
Junior Boarder
Junior Boarder
Posts: 41
Joined: 08.01.2008, 20:35

Post by akli_agha »

Here is the script :

Code: Select all

SET TERM ^ ;

CREATE OR ALTER PROCEDURE GET_PROV_BUD_GLOB (
    mychap char(5),
    myart char(2),
    mypar char(2),
    myaln char(2))
returns (
    tot_bp decimal(15,2),
    tot_bs decimal(15,2),
    tot_br decimal(15,2),
    tot_vir_e decimal(15,2),
    tot_vir_d decimal(15,2))
as
begin
      /* BP */
      select sum(dotation) from budget
      where budget='P' and chap=:myChap and Art=:myArt and
            par=:myPar and aln=:myAln
      into tot_bp;
    
      /* BS */
      select sum(dotation) from budget
      where budget='S' and chap=:myChap and Art=:myArt and
            par=:myPar and aln=:myAln
      into tot_bs;
    
      /* BR */
      select sum(dotation) from budget
      where budget='R' and chap=:myChap and Art=:myArt and
            par=:myPar and aln=:myAln
      into tot_bR;
    
      /* VIR D */
      select sum(MONTANT) from virement
      where Sens='D' and chap=:myChap and Art=:myArt and
            par=:myPar and aln=:myAln
      into tot_vir_D;
    
      /* VIR E */
      select sum(MONTANT) from virement
      where Sens='E' and chap=:myChap and Art=:myArt and
            par=:myPar and aln=:myAln
      into tot_vir_E;
  suspend;
end^

SET TERM ; ^

GRANT SELECT ON BUDGET TO PROCEDURE GET_PROV_BUD_GLOB;

GRANT SELECT ON VIREMENT TO PROCEDURE GET_PROV_BUD_GLOB;

GRANT EXECUTE ON PROCEDURE GET_PROV_BUD_GLOB TO SYSDBA;

PS : DelimiterType set to dtSetTerm.


Thanks.
akli_agha
Junior Boarder
Junior Boarder
Posts: 41
Joined: 08.01.2008, 20:35

Post by akli_agha »

Hi GTO,

Is my script correct or bugged ??

Need other information ??

Regards.
gto
Zeos Dev Team
Zeos Dev Team
Posts: 278
Joined: 11.11.2005, 18:35
Location: Porto Alegre / Brasil

Post by gto »

Hello akli_agha!

I can't see any errors in your SQL, really.

Looking through internet, it looks like a firebird error. Check if version selected in IBExpert is the same version as in Zeos.

There's something too:

http://dn.codegear.com/article/25848

Another thing I see in google is that's something related with UDFs. Do you use them?
Use the FU!!!!!IN Google !

gto's Zeos Quick Start Guide

Te Amo Taís!
Post Reply