Your ZeosLib DBO Version:
The IDE you are using: Lazarus
Version (and maybe patchlevel) of the IDE:
The database you are using: MySQL
Version of the database: 5.1
Used protocol:
[hr]Error description and post
I don't found function to find record in tzquery or tzreadonlyquery except 'locate'. In DAO, there are many function to find record and several criteria. For example : 'findfirst' to find record from first record, 'findnext' to find next record from current record, 'findprevious' to find previous record from current record, and 'findlast' to find record from last record position. And in DAO the criteria to find record is like filter criteria. We can find record with this possiblility :
obj.findfirst('id=''code001''');
obj.findfirst('name like ''machine*''');
obj.findnext('id=''code001'' and name like ''machine*''');
etc.
If we use grid to show record set. Find with this function doesn't reload query so just move record position to founded record. If we use filter the recordset/resultset where is not matching is not visible again.
Is ZeosLib has these function?
In question when we post, there is question 'The IDE you are using'. And MSEide+MSEgui is none. I think Martin named for IDE wiith MSEide+MSEgui is not match with marketing concept. Hardly to remember.
regards,
wahono
Finding record
Moderators: gto, cipto_kh, EgonHugeist, mdaems
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
The zeosdbo components are TDataset descendants. I don't know exactly what search possibilities are provided by a MSE/FPC TDataset.
Looking at the FPC source I've found
I'm afraid you'll have to do it with these. Their behaviour should be documented in the FPC documentation. If they don't work as expected with zeoslib, please file a bug report on our bugtracker (http://zeosbugs.firmos.at/).
AFAIK we don't provide extra search possibilities. Of course, if you write some custom function to support more complex searches in a TDataset using these standard functions we can embed it in zeoslib if it makes sense and the code doesn't depend on features that are not supported on D5-D11 or FPC.
Looking at the FPC source I've found
Code: Select all
function FindFirst: Boolean;
function FindLast: Boolean;
function FindNext: Boolean;
function FindPrior: Boolean;
function Locate(const keyfields: string; const keyvalues: Variant; options: TLocateOptions) : boolean; virtual;
function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant;
property Found: Boolean read FFound;
property Filter: string read FFilterText write SetFilterText;
property Filtered: Boolean read FFiltered write SetFiltered default False;
property FilterOptions: TFilterOptions read FFilterOptions write SetFilterOptions;
AFAIK we don't provide extra search possibilities. Of course, if you write some custom function to support more complex searches in a TDataset using these standard functions we can embed it in zeoslib if it makes sense and the code doesn't depend on features that are not supported on D5-D11 or FPC.