πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.interbase.sql
3 messages
3 total messages Started by odahan Tue, 10 Dec 2002 02:16
ib 6.5 stored proc problem
#11190
Author: odahan
Date: Tue, 10 Dec 2002 02:16
45 lines
2237 bytes
Hi all,

problem is simple : it seems that using a parameter in a select after CONTAINING
doesn't work.
I explain more deeply :
Given the following stored proc :

CREATE PROCEDURE SAMEFILE (
    IFILENAME CHAR(250))
RETURNS (
    BDDCODE INTEGER,
    FNAME CHAR(250),
    FSIZE INTEGER,
    FMODIF DATE)
AS
begin
  for Select distinct b.code, b.filename, b.FileSize, b.Modified
      from bddbag b
      where b.FILENAME containing :IFILENAME /** pb here! **/
      into :BDDCODE, :FNAME, :FSIZE, :FMODIF
      do
        suspend;
end

The problem is : if I use the parameter IFILENAME stored proc returns an empty
dataset. If I use a hardcoded string like 'foo' instead of the parameter ,
that's working...

The worse : using the parameter, all seems to be ok when tracing the procedure
execution under debugger (like the one in QuickDesk). But used in interactive
mode (ibconsole for example), the result set is empty.

I'll be glad to know if this is a known problem and if there is a way to turn
around.

Thanks in advance,


--

Olivier Dahan
______________________________________________________
ICQ#: 165591752
More ways to contact me: http://wwp.icq.com/165591752
______________________________________________________
Re: ib 6.5 stored proc problem / solved - answer
#11192
Author: odahan
Date: Tue, 10 Dec 2002 03:36
61 lines
2818 bytes
Ok... I found what was wrong...
The problem is in the use of CHAR instead of VARCHAR... As it's 4:35 AM here
perhaps muss I go sleeping instead of coding :-)

--

Olivier Dahan
______________________________________________________
ICQ#: 165591752
More ways to contact me: http://wwp.icq.com/165591752
______________________________________________________
"odahan" <odahan@e-naxos.com> a οΏ½crit dans le message de news:
3df54e54@newsgroups.borland.com...
: Hi all,
:
: problem is simple : it seems that using a parameter in a select after
CONTAINING
: doesn't work.
: I explain more deeply :
: Given the following stored proc :
:
: CREATE PROCEDURE SAMEFILE (
:     IFILENAME CHAR(250))
: RETURNS (
:     BDDCODE INTEGER,
:     FNAME CHAR(250),
:     FSIZE INTEGER,
:     FMODIF DATE)
: AS
: begin
:   for Select distinct b.code, b.filename, b.FileSize, b.Modified
:       from bddbag b
:       where b.FILENAME containing :IFILENAME /** pb here! **/
:       into :BDDCODE, :FNAME, :FSIZE, :FMODIF
:       do
:         suspend;
: end
:
: The problem is : if I use the parameter IFILENAME stored proc returns an empty
: dataset. If I use a hardcoded string like 'foo' instead of the parameter ,
: that's working...
:
: The worse : using the parameter, all seems to be ok when tracing the procedure
: execution under debugger (like the one in QuickDesk). But used in interactive
: mode (ibconsole for example), the result set is empty.
:
: I'll be glad to know if this is a known problem and if there is a way to turn
: around.
:
: Thanks in advance,
:
:
: --
:
: Olivier Dahan
: ______________________________________________________
: ICQ#: 165591752
: More ways to contact me: http://wwp.icq.com/165591752
: ______________________________________________________
:
:
Re: ib 6.5 stored proc problem
#11206
Author: Rafael Vacas
Date: Wed, 11 Dec 2002 12:02
45 lines
2251 bytes
On Tue, 10 Dec 2002 03:16:03 +0100, "odahan" <odahan@e-naxos.com>
wrote:

>Hi all,
>
>problem is simple : it seems that using a parameter in a select after CONTAINING
>doesn't work.
>I explain more deeply :
>Given the following stored proc :
>
>CREATE PROCEDURE SAMEFILE (
>    IFILENAME CHAR(250))

Try VARCHAR(250) here ...

>RETURNS (
>    BDDCODE INTEGER,
>    FNAME CHAR(250),
>    FSIZE INTEGER,
>    FMODIF DATE)
>AS
>begin

... or trim IFILENAME here ... or both

>  for Select distinct b.code, b.filename, b.FileSize, b.Modified
>      from bddbag b
>      where b.FILENAME containing :IFILENAME /** pb here! **/
>      into :BDDCODE, :FNAME, :FSIZE, :FMODIF
>      do
>        suspend;
>end
>
>The problem is : if I use the parameter IFILENAME stored proc returns an empty
>dataset. If I use a hardcoded string like 'foo' instead of the parameter ,
>that's working...
>
>The worse : using the parameter, all seems to be ok when tracing the procedure
>execution under debugger (like the one in QuickDesk). But used in interactive
>mode (ibconsole for example), the result set is empty.
>
>I'll be glad to know if this is a known problem and if there is a way to turn
>around.
>
>Thanks in advance,
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads