Solved

DBEngine.Idle

Posted on 2000-03-14
1
1,134 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
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

830 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