As a result of error locking problems that seem to occur after databases should have already been unlocked, I added DBEngine.Idle statements to a VB6 project after .Update, .AddNew, and .Save statements and also at the end of each record pass in lengthy processing loops. The program saves data to Access databases, and the connections to the databases remain open as long as anyone is using the program.
From what I had read, I thought the DBEngine.Idle statement was supposed to allow the jetdatabase engine time to catch up on processing, thus freeing up records that were locked.
The DBEngine.Idle statements appeared to make the program's operation worse than before. Example: Three people were using the program. While the program (a stand alone) was open, User A opened a Microsoft Word document across the network that was in the same network location as the program but in a different folder. While the program was open on User B's PC, User B opened the same document User A had open, received the message that it was open on someone else's PC, and selected the option to open the document as read only. When User C (who also had the program open) went to save a record using the program, User C was prompted to dial in to the network he was already connected to. He had never received this message before and his PC was still connected to the network. He chose not to dial in, and the program appeared to save the record. At the end of the day, he checked his work and saw that none of the records he thought he had saved using the program during the day were actually saved.
Does the DBEngine.Idle statement affect more than just the application that calls it? Does it influence all Microsoft programs that are running?
Is there a better way to prevent 3260 errors that result from records remaining locked?