Unidac vs IB_Objects

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
isysoftware
Posts: 44
Joined: Wed 14 Nov 2012 17:33

Unidac vs IB_Objects

Post by isysoftware » Wed 15 Mar 2017 12:51

Hi All.
I'm working for a software house that uses IB_Objects for Firebird connections;
I'm a Devart user and I would like to convince them to migrate to Unidac for many reasons.
One of the things to which the software house doesn't give up is this:
imagine a form with many controls on it binded by datasource to a IB_Query (es: select * from persons); imagine that this query returns 10 fields; so I have 10 controls for name, surname, phone, email.....
with the istruction IB_Query1.search the IB_Query is in dssearch state; my edit components permits to me to edit it and, on post action, I can search in my dataset for all 10 fields.
There is a way to do this whit unidac?

Image
Image

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Unidac vs IB_Objects

Post by ViktorV » Thu 16 Mar 2017 10:52

For local data search you can use the TUniQuery.Filter property. If it is used, the client fetches all data matching the query and filtering occurs locally.
You can also use the TMemDataSet.Locate and TMemDataSet.LocateEx methods. You can read more about these methods in UniDAC help:
https://www.devart.com/unidac/docs/Deva ... tions).htm, https://www.devart.com/unidac/docs/Deva ... tions).htm

isysoftware
Posts: 44
Joined: Wed 14 Nov 2012 17:33

Re: Unidac vs IB_Objects

Post by isysoftware » Thu 16 Mar 2017 12:08

Hi Viktor,
thanks for your reply;
If I use Locate, I obtain only the first record about my search criterias?
What I need, is a subset of my dataset and this subset must be navigable;

Example:
Person: Name, Age, BirthdayDate

Opening my Select * from person where Age=30 I have:

Flavio 30 14/02/1987
John 30 01/04/1987
Hillary 30 14/02/1987
.......
If I search for BirthdayDate=14/02/1977, I would like to have Flavio and Hillary;
with Locate I obtain only Flavio?

Thanks

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Unidac vs IB_Objects

Post by ViktorV » Thu 16 Mar 2017 12:44

Yes, you are right, in your sample when using the Locate method you will find only the first record. To solve the issue you can use the LocateEx method with the lxNext, lxUp options or use the TUniQuery.Filter property

Post Reply