OS-Windows XP Pro SP2; VB 6 enterprise Edition
I am totally puzzled and stumped on a possible solution.
Scenario:
I wrote a couple applications for a small company. The two applications are called Part Tracker and Inventory. Part Tracker deals with the tracking of Purchase Orders and the parts ordered within the Purchase Order. Inventory deals with Qty on Hand, Qty on Order, etc. of the parts needed to do a specific job.
Not knowing any other database except for Microsoft Access, I used it to create the tables. I realize I should have used something else but now it's too late without a major re-write. So please on your replies, remember the database I AM using.
I used VisData (Microsoft Access Ver 7.0 mdb) to design (create the initial tables). Within the VB applications, I used ADO with SQL commands.
The system these applications were written and tested on is my personal PC at home. A single source PC, not connected to any other PC in a network. The applications work well.
These apps were installed on the user PC. The user PC's are set up in a network. The applications are installed on each user PC and the Database is on the Network server. THESE APPLICATIONS SHARE THE DATABASE TABLES. IT IS POSSIBLE FOR 2 OR MORE PC's TO BE ACCESSING THE TABLES CONCURRENTLY.
THE PROBLEM:
Once in a while when an update is done via either application, the update does NOT take place within the physical table. The only possible condition that I can think of is a concurrency problem. For example--when Part Tracker is updating a page in the Part Status Table (this is in the Inventory db) and some other user is using the Inventory application and grabbing the same page as the Part Tracker application is using. This is only a guess.
QUESTION:
Is there any code I can put around the SQL update statements(Insert, Delete, Update) that would cause the application to go into a limbo stage until the page is not in use?
Please if you have any other possible solution, let me know. Sorry to say, I don't have the time to re-write the applications using another database environment. I need to correct what I have in the shortest amount of time.
Thanks,