Finding records using CRecordset 
Author Message
 Finding records using CRecordset

Hi,

I'm new to CRecordset, ODBC, and SQL. I was wondering if someone could give
me a few pointers to how to do the following things: Also, can someone point
out a good reference for SQL?

How do I...

1. Find a record? (My answer: set the fillter and call Requery then see if
any records are found. Is this correct?)

2. Find a record greater than, less than, greater than or equal, or less
than or equal to the record I want using multiple fields? The fields would
have significance like a multi-segment key in other databases I have worked
with. For example, records might be ordered by date, then time, then UserID.

3. Get a list of records ordered the way I want? How do I write the SQL
statement? Does the desingation of what fields are "keys" in Access affect
the performance for these queries?

Thanks a lot in advance for taking the time to respond.

Brian

--
Brian Kowald



Fri, 08 Sep 2000 03:00:00 GMT  
 Finding records using CRecordset

Quote:

> Hi,

> I'm new to CRecordset, ODBC, and SQL. I was wondering if someone could give
> me a few pointers to how to do the following things: Also, can someone point
> out a good reference for SQL?

> How do I...

> 1. Find a record? (My answer: set the fillter and call Requery then see if
> any records are found. Is this correct?)

> 2. Find a record greater than, less than, greater than or equal, or less
> than or equal to the record I want using multiple fields? The fields would
> have significance like a multi-segment key in other databases I have worked
> with. For example, records might be ordered by date, then time, then UserID.

> 3. Get a list of records ordered the way I want? How do I write the SQL
> statement? Does the desingation of what fields are "keys" in Access affect
> the performance for these queries?

> Thanks a lot in advance for taking the time to respond.

> Brian

> --
> Brian Kowald


Well Brian,
For finding a record, set filter ans requery is good way.
for  sorting you use m_strSort member of CRecordset. Same as
m_strFilter.

Mahesh



Wed, 13 Sep 2000 03:00:00 GMT  
 Finding records using CRecordset

The usage of m_strFilter/m_strSort Don't affect Requery as described in the online
help.  It wasn't working for me so I searched the Microsoft knowledge base and
found (Q111816)

Mike

Quote:


> > Hi,

> > I'm new to CRecordset, ODBC, and SQL. I was wondering if someone could give
> > me a few pointers to how to do the following things: Also, can someone point
> > out a good reference for SQL?

> > How do I...

> > 1. Find a record? (My answer: set the fillter and call Requery then see if
> > any records are found. Is this correct?)

> > 2. Find a record greater than, less than, greater than or equal, or less
> > than or equal to the record I want using multiple fields? The fields would
> > have significance like a multi-segment key in other databases I have worked
> > with. For example, records might be ordered by date, then time, then UserID.

> > 3. Get a list of records ordered the way I want? How do I write the SQL
> > statement? Does the desingation of what fields are "keys" in Access affect
> > the performance for these queries?

> > Thanks a lot in advance for taking the time to respond.

> > Brian

> > --
> > Brian Kowald

> Well Brian,
> For finding a record, set filter ans requery is good way.
> for  sorting you use m_strSort member of CRecordset. Same as
> m_strFilter.

> Mahesh



Sun, 17 Sep 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to find record in CRecordset

2. CRecordSet and finding a record?

3. Very slow performance inserting records using CRecordset

4. Slow Record Addition using VC++ CRecordSet's AddNew and Update functions

5. Problem updating multiple records in CRecordset using dynasets

6. Can't create new record using CRecordset derived class

7. Using Bulk record fetching with CRecordset

8. Need ID of a record added to SQL-Server using MFC/ODBC/CRecordset

9. Q:Error occurs while Using CRecordset to fetch records from OracleDear

10. Problem in adding new records using CRecordset class (in dialogbox)

11. Calling Parameterised Stored Proceedures which returns no records using CRecordset

12. Very slow performance inserting records using CRecordset

 

 
Powered by phpBB® Forum Software