Subject RE: [IBO] Using Filter and then FindFirst method causes exception
Author Anthony Tanas
Hi Helen! :)

>
> It looks as though you are trying to filter output from a
> stored procedure. True or false?

False

>
> Show
>
> 1. the exact SQL statement of the iboquery

SELECT DISTINCT
P.ProcedureID,
P.Description,
P.Code,
C.Name,
R.RoleDescription
FROM
ProcedureCode P
INNER JOIN CATEGORY C ON (P.CATEGORYID = C.CATEGORYID)
INNER JOIN ROLENAMES R ON (P.ROLEID = R.ROLEID)
ORDER BY
C.Name,
P.Description


> 2. the exact
> entries used for the filter clause 3. the code used to apply
> the filter

procedure TfrmEditProcedure.edtSearchProcChange(Sender: TObject);
begin
dtsrcProcedure.DataSet.Filter := 'CODE = ''' + edtSearchProc.Text +'*''';
dtsrcProcedure.DataSet.FindFirst;
end;

This is one example but it seems to not be working anywhere and it did work
with the BDE.

Thanks for any suggestions,

Anthony

>
> Helen
>

> -----Original Message-----
> From: IBObjects@yahoogroups.com
> [mailto:IBObjects@yahoogroups.com] On Behalf Of Helen Borrie
> Sent: Wednesday, March 15, 2006 5:53 PM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] Using Filter and then FindFirst method
> causes exception
>
> At 07:43 AM 16/03/2006, you wrote:
> >Using the IBODataset components...whenever I have in my code where I
> >set the Filter property and then run the FindFirst method I get the
> >following
> >exception:
> >
> >---------------------------------------------------------------------
> >
> >ISC ERROR CODE:335544569
> >
> >ISC ERROR MESSAGE:
> >Dynamic SQL Error
> >SQL error code = -104
> >Token unknown - line 1, char 1
> >FROM
> >
> >STATEMENT:
> >TIB_FilterCursor:
> >"<TApplication>.dtmodCode.qryLoadProcedureChanges.IBOqrqryLoa
> dProcedure
> >Chang
> >es.<TIB_FilterCurso'.
> >
> >-------------------------------------------------------------
> ---------
> >
> >Any ideas on what my problem is?

>