Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple recordsets in one view

Status
Not open for further replies.

xaybzc321

Programmer
Apr 1, 2002
1
US
I am facing the following problem. Can u help me out ?

Application Frontend: Microsoft VC++,SDI DOC/View Architecture
Backend: MS-ACCESS


Document View
======== ====

recordset 1 view - view fields
recordset 2 - no view fields














Say Fields m_minWeight, m_maxWeight is common to both recordset.

Since recordview1 is created with recordset1 , and the Dialog resource fields present accessing is not a problem.

But I need to take some info(say: No of records to be generated, m_minWeight and m_maxWeight_ and I will create a string to display on the recordview fields. I am getting assert failure.

I declared a recordset pointer in the ......doc.h file m_recptr
One instance of Recordset2 created in m_recset; in view file
Also, OnInitialUpdate of View.cpp
m_recptr = &GetDocument()->m_recset;

There are presently 2 records and I want a record count.

But m_recptr->IsBOF() says no records

Can u pls help me ?

Is it possible to attach 2 records to one view and use one recordset for view’s fields and
Other one for fetching data from table for manipulation purpose. I have consulted several books
But no wherethis type of example is there

thnks
manoj


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top