Subject Re: [IBO] IB_Query problems
Author Helen Borrie
At 10:08 AM 18/11/2004 +1100, you wrote:

>Hi,
>
>I have written an application which works perfectly, except in very
>particular instance.
>
>The problems is as follows.
>
>I have a IB_Query which uses a Select Procedure to populate a IB_Grid. It
>works perfectly (with approximately 21 select procedures), except when I
>call a particular Select Procedure (see below the Select procedure in
>question).
>
>I have run the procedure from Database Workbench, and I get no errors. Thus,
>I am assuming that the Select procedure is error free.
>
>The error given by IBObjects is:
>
>CODE:335544569
>
>ISC ERROR MESSAGE
>Dynamic SQL Error
>SQL error code = -206
>Column unknown
>LP_PROCESSNAME
>At line, Column 24.
>
>The procedure is:
>
>SET TERM ^^ ;
>CREATE PROCEDURE P_LP_SELECT_ALL returns (
> LP_PR0CESSNAME VarChar(16),
> LP_LOGMASK SmallInt,
> LP_LOGPATH VarChar(256),
> LP_DAYLIMIT SmallInt)
>AS
>BEGIN
> FOR SELECT
> LP_PR0CESSNAME,
> LP_LOGMASK,
> LP_LOGPATH,
> LP_DAYLIMIT
> FROM
> LOGPARAMS
> INTO
> :LP_PR0CESSNAME,
> :LP_LOGMASK,
> :LP_LOGPATH,
> :LP_DAYLIMIT
> DO
> BEGIN
> SUSPEND;
> END
>END
>^^
>SET TERM ; ^^
>
>The Code is as follows:
>
>....
> CheckDBConnection();
> AQuery->SQL->Add("SELECT * FROM P_LP_SELECT_ALL");
> if( !AQuery->Prepared )
> AQuery->Prepare();
> AQuery->Execute();
>
>
>Any help, suggestions, criticism, humour would be welcome at this stage

Well, what I see is that the exception message refers to a column named
"LP_PROCESSNAME" (6th character is "O" for Orange) while the stored
procedure refers to, and outputs LP_PR0CESSNAME (6th character is literal
zero). Could there be a mistype somewhere in your param or field
references? Masterlinks? KeyLinks? GeneratorLinks?

Helen