Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to find record in CRecordset

55 views
Skip to first unread message

PP

unread,
May 31, 1999, 3:00:00 AM5/31/99
to
Just another stupid problem...
CDaoRecordset has Find method which can find the record in the
recordset. How the same kind of behaviour could be achieved or emulated
using CRecordset ?
The main problem is that I need to position recordset on that particular
record but query must not be reexecuted, i.e. I can not use filter.
Any help and any ideas would be great.

Vijay Kumar Reddy J

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
Hi PPP

Do you want to position at that particular record in the RecordSet just to
read the fields or to update that fields?
If it is just for reading you can create a CRecordSet object for temporary
usage.

{
CRecordSet rTempSet;
rTempSet.Open(AFX_DB_USE_DEFAULT_TYPE,"Select * from Table where Field =
"Name" ");
// Use the record Set by calling GetFieldValue()
}

As far as I know there is no CRecordSet member function equivalent to Find
in CDaoRecordSet and you can implement your own Find function by deriving a
class from CRecordSet and using MoveNext() function or by executing a Filter
query.

Regards,
-Vijay


PP <p...@kordab.lt> wrote in message news:3752ADE1...@kordab.lt...

PP

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
I have to find that particular record in the existing recordset. I do
not need to update or delete that record. Thing is that this recordset
is used to retrieve records for combobox. Find functionality is
necessary for searching the database when typing something in edit field
of that combobox.
0 new messages