Page 1 of 1

Help with Zquery.filter

Posted: 31.07.2010, 21:38
by rchaves
Hello there.

First:

I would like to apologize in advance about my english, rsss.

Second:

Where can i find a list of all ways to use the filter option ?
I dont know if its possible, but i wanna create a general filter option in my software. The user can type for instance 'AAA', then my software looks for the word 'AAA' in any field of my zquery. (all fields like '*AAA*'). With only one field thats OK, but can i do this with all of them ?

Besides that i will have the especific search. The user will click in the grid title and then he can make a search about only that field. That OK for me. But i'm not sure about all options i have to use.

Another question, is there any difference regarding the database im using ? Now i'm with mysql, but my software is compatible with oracle, firebird and more. Do i need to change something using the filter option from one database to another ?

Thanks

Posted: 02.08.2010, 07:27
by Wild_Pointer
rchaves,
First:
There is no problem with your english.

Second:
if you want filter all fields then you should write "field1 like '%AAA%' OR field2 like '%AAA%' OR ..." (in case you want records having at least 1 field with value like '%AAA%'
When you click on grid title you can change the filter - I don't know what other options you might want to change...
I don't think the usage of filter is different for different database engines, but I am not 100% sure...

Good luck using zeos!

Posted: 02.08.2010, 20:47
by Pitfiend
Filters must work with any engine, what you need to be aware of is that the engines are not always datatype compatible.

I learned that the hard way.

From my experience, ADO and MySQL didn't match 100%, SQLite has a relaxed datatype model (means that it only has 4 general datatypes), didn't try any other engine at the moment.

As long as I can speculate, you need to have independent data objects for each database engine you want to use. You can't change your connection type on the fly and run against every engine in the world with only one set of design-time-assigned objects, even if the databse model is the same.

Maybe I did something wrong, maybe not, but that were the results in my tests.

Posted: 30.08.2010, 00:14
by mdaems
Pitfiend,

As far as I know FILTER behaviour is a client side thing so should be independent of the database behind the application.
The big disadvantage is the server doesn't take into account this filter and just returns all records for the sql statement. The filtering is done by the dataset component.

Mark