M
Mitch
I come from a VB, SQL Server/Oracle background and am pretty new to Access
developement. I recently developed a small database using A2K that was not
supposed to be used by more than 1-2 users concurrently. Well, it has
turned into a 6-12 user app (depending on the size of the office where it is
deployed) and database corruption has become a major issue. The database
can become corrupt up to 6 times daily, at which point all users must exit
the DB while it is compacted/repaired. I understand that network
instability can play a large part in corruption, but I have no control over
the LAN. So therefore I want to concentrate on making sure the part I do
control (the application) is not contributing to the instability.
I'm pretty sure it was poor application design on my part that is
contributing to the instability
Data access was written using ADO hierarchical (shaped) recordsets and the
4.0 Jet provider. I maintain a module
level connection to the database for each data entry form that is open by
the user. Since the average user keeps 2 forms open at one time, I probably
have 12 to 24 ADO connections established to the database at any given time.
(2 connections per user multiplied by 6-12 users). Obviously, my main
problem I keeping too many persistent connections to Access.
I tried to shorten my connection open time by disconnecting my recordsets,
but this MS knowledge base issue explains that disconnected shaped
recordsets do not release their connection to the database
http://support.microsoft.com/default.aspx?scid=kb;en-us;288409. I tested it
myself in Access 2000 and verified that this holds true.
So short of re-writing my data access code entirely, what are my options for
minimizing database connections?
Thanks for any feedback you can provide!
developement. I recently developed a small database using A2K that was not
supposed to be used by more than 1-2 users concurrently. Well, it has
turned into a 6-12 user app (depending on the size of the office where it is
deployed) and database corruption has become a major issue. The database
can become corrupt up to 6 times daily, at which point all users must exit
the DB while it is compacted/repaired. I understand that network
instability can play a large part in corruption, but I have no control over
the LAN. So therefore I want to concentrate on making sure the part I do
control (the application) is not contributing to the instability.
I'm pretty sure it was poor application design on my part that is
contributing to the instability
Data access was written using ADO hierarchical (shaped) recordsets and the
4.0 Jet provider. I maintain a module
level connection to the database for each data entry form that is open by
the user. Since the average user keeps 2 forms open at one time, I probably
have 12 to 24 ADO connections established to the database at any given time.
(2 connections per user multiplied by 6-12 users). Obviously, my main
problem I keeping too many persistent connections to Access.
I tried to shorten my connection open time by disconnecting my recordsets,
but this MS knowledge base issue explains that disconnected shaped
recordsets do not release their connection to the database
http://support.microsoft.com/default.aspx?scid=kb;en-us;288409. I tested it
myself in Access 2000 and verified that this holds true.
So short of re-writing my data access code entirely, what are my options for
minimizing database connections?
Thanks for any feedback you can provide!