Page 1 of 1

Unidac vs IB_Objects

Posted: Wed 15 Mar 2017 12:51
by isysoftware
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

Re: Unidac vs IB_Objects

Posted: Thu 16 Mar 2017 10:52
by ViktorV
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

Re: Unidac vs IB_Objects

Posted: Thu 16 Mar 2017 12:08
by isysoftware
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

Re: Unidac vs IB_Objects

Posted: Thu 16 Mar 2017 12:44
by ViktorV
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