
July 22nd, 2009, 01:05 PM
|
|
Registered User
|
|
Join Date: Jul 2009
Posts: 1
Time spent in forums: 43 m 39 sec
Reputation Power: 0
|
|
|
Access Programming - VB6 index problem with Access using Datagrid
Hello. I’m using VB6 to manipulate an Access database over a local network. My problem is that occasionally the Datagrid I’m using loses track of the database index. The database is located on the server, Microsoft Windows Small Business Server 2003.
The program is used to assign and track serial numbers for our products. There are 3 separate tables in the database that are nearly identical except for the serial numbers themselves because we have 3 different product lines with different types of serial number assignment. The operation is initially “Assign the next 50 (or whatever number) serial numbers to this model”. Other departments then add shipping info and RMA info as needed, usually at a later date.
Each table is selected programmatically by the user. I’m using the ADODC object (x3) to open the database.
The specific problem is that although the program usually works flawlessly, once or twice a week the last items added do not appear in the Datagrid, and in fact are ignored. This is a major problem since the program reads the last serial number used in order to assign the next. If I open the database using MS Access all looks well, the last items are there and appear to be properly indexed. Oddly, running the “compact and repair” utility reliably fixes the problem for a few days.
The database is shared by all users, and several departments might be accessing it simultaneously.
Early on I would find local computers with several copies of the program running in the background because I wasn’t terminating the program properly. But now (using the task manager) I don’t see any sign of that. Maybe still related somehow?
I’m not a programmer by trade and am self-taught so the code is ugly but basically quite functional. This is not my first program, but it is the most complex one I’ve ever written.
If anyone can think of a reason this should be happening, please help. I’ll be happy to share any section of code you think might be causing the problem.
|