For the first issue, you can either set up a thread to load your data or if
you are using DAO Recordsets you could use the SetCache methods to improve
performance (this is essentially what the Access program does). Here is a
code snippet that would be place in your OnInit or OnInitialUpdate class:
m_pSet = &GetDocument()->m_realtySet;
COleVariant firstRecord= m_pSet->GetBookmark();
long numRecs = m_pSet->GetRecordCount();
if (numRecs>300) numRecs=300;
numRecs = (long )(numRecs *(1/10));
for(int i=0; i<10; i++)
if(AfxMessageBox(_T("Are you sure you want to
In the example m_pSet is defined and declared in the your Document class
(assuming Doc/View project).
I hope this helps...
Your more important issue strains my memory, but I know I resolved this
several years ago. Unfortunately, I can't remember the solution. I keep the
----- Original Message -----
From: "ac" <achmiel@stripped>
Sent: Wednesday, December 05, 2001 4:13 AM
Subject: MFC CRecordset / MyODBC
> I just migrated from Access2000 to MySQL and had to change quite an amount
> of sourcecode to fit the new needs. I work with VC++ 6, MyODBC 3.70 and
> MySQL 3.23. There's two point leaving me desperate:
> 1. In Access, when opening a database without a filter, I get instant
> access. IN MySQL, it may take several seconds, depending on the size of
> table. Obviously, MySQL is reading the whole table onto my machine. Any
> to change that?
> 2. (MORE IMPORTANT!) Every now and then I get this message (in german):
> waren keine Zeilen von der Aktualisierungs- oder Löschoperation betroffen"
> which means (sort of): "NO rows affectec by Update or delete".
> This problem occurs with no for me logic reason on some recordsets, not on
> all though, and also not every time, just sometime. It appears no matter
> there actually was a change in the recordset or not, doesn't matter.
> I believe this is an error MyODBC is sending me, so how can I turn it off
> and just let MySQL overwrite the recordset? Please help, I'm lost!!!
> Thanks in advance.
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail myodbc-thread4283@stripped
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail myodbc-unsubscribe@stripped instead.