Filtering with TOraTable

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Wojtek

Filtering with TOraTable

Post by Wojtek » Mon 27 Dec 2004 13:10

Hi,

does anyone know how to use "Filter" and/or "FilterSQL" properties of
TOraTable object to filter data od date fields (using Oracle function to_date()).. I try to do this in several ways, but I still get runtime errors.

Thanks for any help.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Mon 27 Dec 2004 15:45

You can use FilterSQL property to add necessary conditions in WHERE clause of SQL statement, for example:
OraQuery1.SQL.Text := 'Select * from Emp';
OraQuery1.FilterSQL := 'HIREDATE > to_date(''01-01-1981'',''dd-mm-yyyy'')';
OraQuery1.Filtered := True;
OraQuery1.Open;

Post Reply