Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is the Application faster than the Database?

Status
Not open for further replies.

waldemar

Programmer
Nov 15, 2001
245
DE
This happens from time to time when I do a lot of Recordset-Stuff to the Database. Especially in a Routine that runs through some thousand entries to check for plausibility...:

I get an Error saying "The File [THE DATABASE] (or one of it's components) is not available ...." with the Database sometimes stopping completly (becoming a zombie task), sometimes resuming smooth...

What happens here? I get this very unfrequent and when the Database runs slower due to other circumstances this error seems to appear less.... feels like something is faster/slower than something else...
 
I haven't had a problem with that message, but I have had problems while waiting on long recordset tasks like that. DoEvents might help. That lets it do everything else it needs to do before continuing. My problem was that I couldn't tell what was going on without pausing the execution. I added a progress bar so that I could see how far along it was and that it was actually working. I had to use DoEvents to make it work.

If you don't have DoEvents in your code, try adding it. If you do already have it, I don't know.
 
Sounds exactly like the function I was hopening for... Too bad it doesn't work... I still get the Error Message.... (right now however the code continous working... )
 
That's a start. Don't know about the error, though. Are you doing anything else in the db while the process is running? Is someone else trying to do anything in the db while it's running? I wouldn't think that that would affect it, but it's a thought. I'm just brainstorming now.
 
Gotcha, in the loop:

Forms("frmStatus").Caption = "Checking Plausibility " & strLastPercent & "% ..."
Forms("frmStatus").lblCheckPlausibilityStudents.Caption = "Checking Plausibility " & strLastPercent & "% ..."
Forms("frmStatus").Repaint


This seems to be code that causes the running process to "stumble"... I assume this means JET is faster than the access form update...
 
Interesting.

That must be the case. It wouldn't show me my progress bar, either, until I put the DoEvents command in there.
 
This is very desturbing.... I remarked the three lines above to find out that the error disappears.... now I un-remark them again and testrun.... and: no error-message... Since I did not change anything in the code compared to the runs when the message appeared, this is a non-reproductive error.... §"$@&%@$§%$#%!!
 
So this axiom seems to be the result?:

If ya do a lot of recordset stuff - and I mean A LOT - and you synchronize some screen output with it, make sure to run DoEvents after the visual code before you proceed with the JET engine stuff...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top