Board index » delphi » IBQuery and Filter

IBQuery and Filter

I've got the following lines in a program, and when the 2nd one is
executed, I get the error: 'program_name.exe' raised exception class
EIBClientError with message 'Unsupported feature'

ibquVConCursoUni is a TIBQuery:

    ibquVConCursoUni.Filter:= 'CodigoCurso='+
dmContinua.ibquVConCursoUniCodigoCurso.AsString;
    ibquVConCursoUni.Filtered:= True;

Is there something wrong with this??? Which is the sintax for Interbase
to do a filter??? (maybe this one is wrong, because I've copied it from
a previous version which was developed for SQLSERVER (through the BDE).

Thanks in advance...

Have a good weekend

 

Re:IBQuery and Filter


Try putting the string in quotes:

     ibquVConCursoUni.Filter:= 'CodigoCurso="'+

Quote
> dmContinua.ibquVConCursoUniCodigoCurso.AsString+'"';

Geoff Marshall
GEMSYS Ltd
Quote
Koro Gabiola wrote:

> I've got the following lines in a program, and when the 2nd one is
> executed, I get the error: 'program_name.exe' raised exception class
> EIBClientError with message 'Unsupported feature'

> ibquVConCursoUni is a TIBQuery:

>     ibquVConCursoUni.Filter:= 'CodigoCurso='+
> dmContinua.ibquVConCursoUniCodigoCurso.AsString;
>     ibquVConCursoUni.Filtered:= True;

> Is there something wrong with this??? Which is the sintax for Interbase
> to do a filter??? (maybe this one is wrong, because I've copied it from
> a previous version which was developed for SQLSERVER (through the BDE).

> Thanks in advance...

> Have a good weekend

Re:IBQuery and Filter


No, the problem is this:

(in IBQuery.pas)
procedure TIBQuery.SetFiltered(Value: Boolean);
begin
  if Value <> False then
    IBError(ibxeNotSupported, [nil]);
end;

and this:

(in IBCustomDataSet.pas)
procedure TIBDataSet.SetFiltered(Value: Boolean);
begin
  if Value <> False then
    IBError(ibxeNotSupported, [nil]);
end;

In other words, IBX does not support filtering for IBQuery.  I didn't
know this as I proceeded merrily down the IBX path.  Now that I've
spent months developing the app, I find out that this feature, which my
app unconditionally requires, isn't available.  Funny, I don't remember
seeing any warning about this when I read about the new, wonderful IBX
components that come with D5. Thanks, guys.

In article <38C2CA94.44CCF...@dial.pipex.com>,

Quote
aa...@nospam.dial.pipex.com wrote:
> Try putting the string in quotes:

> ibquVConCursoUni.Filter:= 'CodigoCurso="'+
> > dmContinua.ibquVConCursoUniCodigoCurso.AsString+'"';

> Geoff Marshall
> GEMSYS Ltd

> Koro Gabiola wrote:

> > I've got the following lines in a program, and when the 2nd one is
> > executed, I get the error: 'program_name.exe' raised exception class
> > EIBClientError with message 'Unsupported feature'

> > ibquVConCursoUni is a TIBQuery:

> > ibquVConCursoUni.Filter:= 'CodigoCurso='+
> > dmContinua.ibquVConCursoUniCodigoCurso.AsString;
> > ibquVConCursoUni.Filtered:= True;

> > Is there something wrong with this??? Which is the sintax for
Interbase
> > to do a filter??? (maybe this one is wrong, because I've copied it
from
> > a previous version which was developed for SQLSERVER (through the
BDE).

> > Thanks in advance...

> > Have a good weekend

Sent via Deja.com http://www.deja.com/
Before you buy.

Other Threads