Solved

DBEngine.Idle

Posted on 2000-03-14
1
1,202 Views
Last Modified: 2008-02-20
Hi,

I am wondering where is the best place to use DBEngine.Idle dbRefreshCache in my data objects.

My objects encapsulate some DAO functionality.

E.g. Customer Object has the following methods:

AddNew
Delete
Update
Load
SaveChanges
MoveNext
MoveFirst

...etc
Get the picture?

For a multiuser environment DAO literature quotes that you should periodically use DBEngine.Idle dbRefreshCache to suspend processing and let the DAO engine catch up.

My question is where would be the best place to use this in my objects.

I was thinking of sticking it in all the methods that change the recordset,i.e  AddNew,Delete, Update and SaveChanges.

I am thinking correct or do I need certifying?

Should I just use it on all the methods including MoveFirst, MoveNext etc.

Thanks in Advance.

Best Wishes

Adrian Evans
United Kingdom.
0
Comment
Question by:AdiEvans
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
RPoate earned 100 total points
ID: 2622719
My first thought on this one is that
"if it ain't broke don't fix it". In other words if you do not have a problem then you don't need to worry about it.

I found that I had a problem where I was changing the database tables (adding columns). When I tried to write to the columns to set values in then I was told that the columns did not exist.  When I looked in Access the columns were there.

I found out that if I delayed setting the column values then it worked.

It turned out to be a "NT4 lazy disk write" problem. NT "said" it had written the changes to disk but in fact it had not.  It took a few seconds to flush its buffers.

I solved the problem with:

CDB_WS.BeginTrans
DBEngine.Idle dbRefreshCache
CDB_WS.CommitTrans dbForceOSFlush

So in general terms I would suggest that you can use it anywhere you like but really it is only necessary if you have a problem.

Regards
Robert Poate

PS I'm not sure if this is a comment or an answer.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month3 days, 13 hours left to enroll

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question