Please help !!!!
-
How can i load my data more fast in my ListCtrl ? I have my database in another computer on ODBC so in my computer ! VisualFoxpro 6.0 database ! This code works and i have some speed but if is posibile to have more speed please help me with an example ! this is my code : ...must be something to do , to have more speed !!!!!!!! void CMyListCtrl::FillList() { CDatabase_Plan* pPlan = new CDatabase_Plan(); if (!pPlan->Open()) return; if (pPlan->IsOpen()) { int x = 0; m_list.LockWindowUpdate(); while (!pPlan->IsEOF() ) { int nItem = m_list.InsertItem(x, pPlan->m_name); m_list.SetItemText(nItem, 1, pPlan->m_den); pPlan->MoveNext(); x++; } } m_list.UnlockWindowUpdate(); m_list.Invalidate(); m_list.UpdateWindow(); pPlan->Close(); }
Bravoone
-
How can i load my data more fast in my ListCtrl ? I have my database in another computer on ODBC so in my computer ! VisualFoxpro 6.0 database ! This code works and i have some speed but if is posibile to have more speed please help me with an example ! this is my code : ...must be something to do , to have more speed !!!!!!!! void CMyListCtrl::FillList() { CDatabase_Plan* pPlan = new CDatabase_Plan(); if (!pPlan->Open()) return; if (pPlan->IsOpen()) { int x = 0; m_list.LockWindowUpdate(); while (!pPlan->IsEOF() ) { int nItem = m_list.InsertItem(x, pPlan->m_name); m_list.SetItemText(nItem, 1, pPlan->m_den); pPlan->MoveNext(); x++; } } m_list.UnlockWindowUpdate(); m_list.Invalidate(); m_list.UpdateWindow(); pPlan->Close(); }
Bravoone
Please use the notification LVN_GETDISPINFO for implementing virtual list concept for example see the link http://www.codeproject.com/listctrl/virtuallist.asp Regards RinuRaj
-
Please use the notification LVN_GETDISPINFO for implementing virtual list concept for example see the link http://www.codeproject.com/listctrl/virtuallist.asp Regards RinuRaj
No , my code works but he need ... something ... maybe MoveNext have a problem i dont no please help me !
Bravoone
-
No , my code works but he need ... something ... maybe MoveNext have a problem i dont no please help me !
Bravoone
Whats problem with
MoveNext
_**
**_
WhiteSky
-
No , my code works but he need ... something ... maybe MoveNext have a problem i dont no please help me !
Bravoone
maybe MoveNext is slow !? i dont now! please help !
Bravoone
-
maybe MoveNext is slow !? i dont now! please help !
Bravoone
-
How can i load my data more fast in my ListCtrl ? I have my database in another computer on ODBC so in my computer ! VisualFoxpro 6.0 database ! This code works and i have some speed but if is posibile to have more speed please help me with an example ! this is my code : ...must be something to do , to have more speed !!!!!!!! void CMyListCtrl::FillList() { CDatabase_Plan* pPlan = new CDatabase_Plan(); if (!pPlan->Open()) return; if (pPlan->IsOpen()) { int x = 0; m_list.LockWindowUpdate(); while (!pPlan->IsEOF() ) { int nItem = m_list.InsertItem(x, pPlan->m_name); m_list.SetItemText(nItem, 1, pPlan->m_den); pPlan->MoveNext(); x++; } } m_list.UnlockWindowUpdate(); m_list.Invalidate(); m_list.UpdateWindow(); pPlan->Close(); }
Bravoone
Hello, i wondered, why you use this:
m_list.LockWindowUpdate(); // why LockWindowUpdate(); ???? you see your results after all the records r reading!? What when you want to read 100000 records? wait so long to see something? // you should show the items in the list, i just make a litle function, only when they is finish, all items are showed! show the items immediately nt nItem = m_list.InsertItem(x, pPlan->m_name); // dont need nItem, use x instead! when you use SetItemText directly after InsertItem, it is the same index m_list.SetItemText(x, 1, pPlan->m_den); pPlan->MoveNext(); x++;
this maybe:void CMyListCtrl::FillList() { CDatabase_Plan* pPlan = new CDatabase_Plan(); if (!pPlan->Open()) return; if (pPlan->IsOpen()) { int x = 0; //m_list.LockWindowUpdate(); // dont loock the window! while (!pPlan->IsEOF() ) { //int nItem = m_list.InsertItem(x, pPlan->m_name); // dont use for all next item an new variable m_list.InsertItem(x, pPlan->m_name); //m_list.SetItemText(nItem, 1, pPlan->m_den); m_list.SetItemText(x, 1, pPlan->m_den); // use the same! pPlan->MoveNext(); x++; } } //m_list.UnlockWindowUpdate(); m_list.Invalidate(); m_list.UpdateWindow(); pPlan->Close(); } this is an litle idea from me...hope this helps litle :) regards break;
-
Hello, i wondered, why you use this:
m_list.LockWindowUpdate(); // why LockWindowUpdate(); ???? you see your results after all the records r reading!? What when you want to read 100000 records? wait so long to see something? // you should show the items in the list, i just make a litle function, only when they is finish, all items are showed! show the items immediately nt nItem = m_list.InsertItem(x, pPlan->m_name); // dont need nItem, use x instead! when you use SetItemText directly after InsertItem, it is the same index m_list.SetItemText(x, 1, pPlan->m_den); pPlan->MoveNext(); x++;
this maybe:void CMyListCtrl::FillList() { CDatabase_Plan* pPlan = new CDatabase_Plan(); if (!pPlan->Open()) return; if (pPlan->IsOpen()) { int x = 0; //m_list.LockWindowUpdate(); // dont loock the window! while (!pPlan->IsEOF() ) { //int nItem = m_list.InsertItem(x, pPlan->m_name); // dont use for all next item an new variable m_list.InsertItem(x, pPlan->m_name); //m_list.SetItemText(nItem, 1, pPlan->m_den); m_list.SetItemText(x, 1, pPlan->m_den); // use the same! pPlan->MoveNext(); x++; } } //m_list.UnlockWindowUpdate(); m_list.Invalidate(); m_list.UpdateWindow(); pPlan->Close(); } this is an litle idea from me...hope this helps litle :) regards break;
ok Thanks for your help but my problem i think is movenext !? please help ! is slow i need more speed how ?!!!!
Bravoone
-
ok Thanks for your help but my problem i think is movenext !? please help ! is slow i need more speed how ?!!!!
Bravoone
Hello, if this is an CRecordset, try to use an open type like CRecordset::forwardOnly, means you want only to rad one more, from begin to end! This brings you litle more speed, if you solve you problem please post here for me and others to now how! regards
-
Hello, if this is an CRecordset, try to use an open type like CRecordset::forwardOnly, means you want only to rad one more, from begin to end! This brings you litle more speed, if you solve you problem please post here for me and others to now how! regards
how to use forwardonly ?my CRecordSet is snapshot !!!!
Bravoone
-
Hello, if this is an CRecordset, try to use an open type like CRecordset::forwardOnly, means you want only to rad one more, from begin to end! This brings you litle more speed, if you solve you problem please post here for me and others to now how! regards
again if it is the recordset and specialy the MoveNext part you could do the following: make sure you don't collect record by record. Normaly a movenext requests only the next item from the server meaning just on record per fetch(data receivig) you can retrieve multilple records in a single fetch. Check the following Fetching Records in Bulk[^] for more details.
codito ergo sum
-
again if it is the recordset and specialy the MoveNext part you could do the following: make sure you don't collect record by record. Normaly a movenext requests only the next item from the server meaning just on record per fetch(data receivig) you can retrieve multilple records in a single fetch. Check the following Fetching Records in Bulk[^] for more details.
codito ergo sum
how ? please help me with an example !
Bravoone
-
how ? please help me with an example !
Bravoone
Please help me because i dont understand how can i implement this !?
Bravoone
-
Please help me because i dont understand how can i implement this !?
Bravoone
How can i do this with my code ? void CDatabase_Note::DoBulkFieldExchange( CFieldExchange* pFX ) { // call the Bulk RFX functions // for field data members pFX->SetFieldType( CFieldExchange::outputColumn ); RFX_Text_Bulk( pFX, _T( "[debit]" ), &m_debit, &m_credit, 30 ); } i have a error cannot convert from CString to char please someoane help me ?!!!!
Bravoone
-
Please use the notification LVN_GETDISPINFO for implementing virtual list concept for example see the link http://www.codeproject.com/listctrl/virtuallist.asp Regards RinuRaj
Rinu_Raj wrote:
Please use the notification LVN_GETDISPINFO for implementing virtual list concept
This type of control has already been suggested here, and probably more than once. He's not into research, though, but just wants someone else to do all of his work. :(
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
-
How can i load my data more fast in my ListCtrl ? I have my database in another computer on ODBC so in my computer ! VisualFoxpro 6.0 database ! This code works and i have some speed but if is posibile to have more speed please help me with an example ! this is my code : ...must be something to do , to have more speed !!!!!!!! void CMyListCtrl::FillList() { CDatabase_Plan* pPlan = new CDatabase_Plan(); if (!pPlan->Open()) return; if (pPlan->IsOpen()) { int x = 0; m_list.LockWindowUpdate(); while (!pPlan->IsEOF() ) { int nItem = m_list.InsertItem(x, pPlan->m_name); m_list.SetItemText(nItem, 1, pPlan->m_den); pPlan->MoveNext(); x++; } } m_list.UnlockWindowUpdate(); m_list.Invalidate(); m_list.UpdateWindow(); pPlan->Close(); }
Bravoone
Its a suggestion if we suppose that you have 1000 records in your database and now you want to read their you can break their to 1000/5=200 and then create 5 thread in each thread you insert a loop for read of database in last thread on the loop you use from
while (!pPlan->IsEOF() )
i think its good than to use a loop for read 1000 records on runtime_**
**_
WhiteSky