Click here to Skip to main content
15,916,417 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: database Pin
Bravoone_200616-Aug-06 23:38
Bravoone_200616-Aug-06 23:38 
AnswerRe: database Pin
Stephen Hewitt16-Aug-06 23:39
Stephen Hewitt16-Aug-06 23:39 
AnswerRe: database Pin
Hamid_RT16-Aug-06 23:49
Hamid_RT16-Aug-06 23:49 
GeneralRe: database Pin
wiemounir16-Aug-06 23:58
wiemounir16-Aug-06 23:58 
QuestionPlease help !!!! Mfc database Pin
Bravoone_200616-Aug-06 23:27
Bravoone_200616-Aug-06 23:27 
AnswerRe: Please help !!!! Mfc database Pin
prasad_som16-Aug-06 23:39
prasad_som16-Aug-06 23:39 
QuestionRe: Please help !!!! Mfc database Pin
Bravoone_200617-Aug-06 0:01
Bravoone_200617-Aug-06 0:01 
AnswerRe: Please help !!!! Mfc database Pin
prasad_som17-Aug-06 0:19
prasad_som17-Aug-06 0:19 
You must be dealing with CRecordSet class in your application. I assume your code to fill the list is like this,
//example from MSDN
CRecordSet rs;
// Open the recordset
rs.Open( CRecordset::dynaset, NULL,
         CRecordset::useMultiRowFetch );

// loop through the recordset by rowsets
while( !rs.IsEOF( ) )
{
    for( int rowCount = 0; 
         rowCount < (int)rs.GetRowsFetched( );
         rowCount++ )
    {
       // do something
      //you must be adding values from result to list control
    }

   rs.MoveNext( );
}

rs.Close( );

instead make changes to your code like this,
// Open the recordset
rs.Open( CRecordset::dynaset, NULL,
         CRecordset::useMultiRowFetch );
rs.Open( CRecordset::dynaset,
         _T( "Select count(*) from Tablename" ) );//I dont know exact query //but , it gives row count in table

//now instead of travesing record set
    for( int rowCount = 0; 
         rowCount < (int)rs.GetRowsFetched( );
         rowCount++ )
    {
       // do something
      //fill list control with empty rows
    }

now get first visible row in list control and last visible row .
and query database for those records only. and update rows of list control.
On each scroll you can query for corresponding rows. You can set flat to each rows , to know whether it is updated?
You need to handle this in WM_VSCROLL with wParam value as SB_ENDSCROLL.


GeneralRe: Please help !!!! Mfc database Pin
Bravoone_200617-Aug-06 0:34
Bravoone_200617-Aug-06 0:34 
GeneralRe: Please help !!!! Mfc database Pin
prasad_som17-Aug-06 0:42
prasad_som17-Aug-06 0:42 
QuestionRe: Please help !!!! Mfc database Pin
Bravoone_200617-Aug-06 0:43
Bravoone_200617-Aug-06 0:43 
GeneralRe: Please help !!!! Mfc database Pin
prasad_som17-Aug-06 0:49
prasad_som17-Aug-06 0:49 
GeneralRe: Please help !!!! Mfc database Pin
Bravoone_200617-Aug-06 0:58
Bravoone_200617-Aug-06 0:58 
GeneralRe: Please help !!!! Mfc database Pin
prasad_som17-Aug-06 1:05
prasad_som17-Aug-06 1:05 
AnswerRe: Please help !!!! Mfc database Pin
Hamid_RT18-Aug-06 7:51
Hamid_RT18-Aug-06 7:51 
QuestionThread Query in vc++ Pin
madhu_v16-Aug-06 23:21
madhu_v16-Aug-06 23:21 
AnswerRe: Thread Query in vc++ Pin
ThatsAlok17-Aug-06 0:00
ThatsAlok17-Aug-06 0:00 
AnswerRe: Thread Query in vc++ Pin
Stephen Hewitt17-Aug-06 0:11
Stephen Hewitt17-Aug-06 0:11 
Question_Xran Linker error Pin
Hariharan.T16-Aug-06 23:14
Hariharan.T16-Aug-06 23:14 
AnswerRe: _Xran Linker error Pin
Hamid_RT18-Aug-06 7:52
Hamid_RT18-Aug-06 7:52 
GeneralRe: _Xran Linker error Pin
Hariharan.T22-Aug-06 1:05
Hariharan.T22-Aug-06 1:05 
QuestionDetecting file / folder events Pin
wheelerbarry16-Aug-06 22:51
wheelerbarry16-Aug-06 22:51 
AnswerRe: Detecting file / folder events Pin
Hamid_RT18-Aug-06 7:52
Hamid_RT18-Aug-06 7:52 
QuestionDll question in vc and call by vb (about wmi) Pin
baicker16-Aug-06 22:50
baicker16-Aug-06 22:50 
AnswerRe: Dll question in vc and call by vb (about wmi) Pin
toxcct16-Aug-06 22:57
toxcct16-Aug-06 22:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.