FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Find on more FIELDS with ADO
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Find on more FIELDS with ADO
Posted: Thu Oct 18, 2012 06:12 AM
Hi,

I'm convering my programs from DBF to ADO.
I have also a find thad the user can find a record in a list with criteria on more than one field.
With DBF I could do a locate for FIELD1 =.. .and. FIELD2=...
How can I do this with ADO on a recordset.

According to the info of the FIND-methode I can only specify 1 field.

Required. The column name, comparison operator, and value to use in the search.
Examples:

"Country='Norway'"
"Date>#7/22/97#"
"Country LIKE N*"

Note: This method does not support multi-column searches (AND or OR)


I don't want to use the filter-property, because I want to show everything. I only want to go to that record.
I also looking for a replacement for a locate next...

I thought maybe running a second recordset with a query, and remembering the ID-number, a jump in my first recordset to that ID. When I to a 'Find Next', I jump to the second one.
But it would be easyier, just with something like FIND...
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Find on more FIELDS with ADO
Posted: Thu Oct 18, 2012 08:45 AM
Marc Vanzegbroeck wrote:I don't want to use the filter-property, because I want to show everything. I only want to go to that record.
I also looking for a replacement for a locate next...

I thought maybe running a second recordset with a query, and remembering the ID-number, a jump in my first recordset to that ID. When I to a 'Find Next', I jump to the second one.
But it would be easyier, just with something like FIND...


Can't you use the same technique using filters?

EMG
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: Find on more FIELDS with ADO
Posted: Thu Oct 18, 2012 10:33 AM
Enrico Maria Giordano wrote:
Can't you use the same technique using filters?
EMG


Indeed, I will try it.
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite

Continue the discussion