Solved

Database connection problem

Posted on 2001-06-28
16
611 Views
Last Modified: 2012-08-13
My Visual Basic application is using MS Access database and it is multi-user.  Lately I encounter the following error message when stating the application:

1. Error #3343 was generated by DAO workspace unrecognized database format 'h:\brains.mdb'

2. Error #91 was generated by Project1 object variable or with block variable not set.

After repair the database the problem will solve.  Why the database corrupted and what is the possible cause?
0
Comment
Question by:cwchaw
  • 5
  • 4
  • 3
  • +3
16 Comments
 
LVL 43

Expert Comment

by:TimCottee
Comment Utility
Just one of those things that happens with access. Especially if you have a large (>5 users) accessing the database it is quite likely that it will be corrupted from time to time. Usually because of users abnormally terminating the connection or their transaction. You already have the one and only solution which is to repair the database. It may make sense to add some code to the application which on each user's exit of the application will attempt to obtain exclusive use of the database; if it does it can then automatically run the repair/compact code to assist in the maintenance of the database.

Access is not really the best solution for a multi-user database with a large number of users for this (and other) reasons. I would personally be considering upgrading to SQL server (either the desktop edition if you only have a few users) or the full scale version if it is a large number of users.
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
Probably using Access 2000.

For error 3343, have a look at these 2 articles:
http://support.microsoft.com/support/kb/articles/Q238/4/01.ASP
http://support.microsoft.com/support/kb/articles/Q272/6/22.ASP

For error 91, the problem will surely be solved if 3343 is fixed.
0
 
LVL 3

Expert Comment

by:jrspano
Comment Utility
you can try the MSDE if you don't want to pay for sql server.  it is on the vb cd, and also i think on the office cd.
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
MSDE won't help for that kind of problems!
0
 
LVL 3

Expert Comment

by:jrspano
Comment Utility
why not.  it won't get corrupted like that.  it is more powerful than access and will hold more users.
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
MSDE is limited to 5 users for full speed. It will trottle all the connection when the 6th user log-in.

The problem that cwchaw has is not corruption, it is caused by drivers.
0
 
LVL 3

Expert Comment

by:jrspano
Comment Utility
access is limited also. according to ms you use access for single user to a couple of users, use msde for anything up to needing a full sql server.  I'll see if i can find the article I read.
0
 

Author Comment

by:cwchaw
Comment Utility
I suspected it was due to the multi-user and possibly the instability of Access in such an environment but what has got me stumped is that I have another system which is multi-user as well, and the size of the DB is double the problematic one...  BUt that one works fine...
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
Is your DB in Access 2000?
0
 

Author Comment

by:cwchaw
Comment Utility
No, is Access 97 using VB 5 with SP2.
0
 

Author Comment

by:cwchaw
Comment Utility
No, is Access 97 using VB 5 with SP2.
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
I had that problem once when a user opened the DB with Access 2000 and converted it. My app was not running anymore after.
0
 

Author Comment

by:cwchaw
Comment Utility
I am using Windows NT to host MS Access 97 database but occasional the problem happen.  So I move to Windows 2000, worst it happen everyday.

But I have found that my another application where the Access 97 is host on Windows 95 is working fine until now even with bigger size, so does it mean Access 97 will only work well on desktop such as Windows 9x/ME?
0
 
LVL 14

Accepted Solution

by:
profya earned 200 total points
Comment Utility
- Reveise the application itself and check that each module closes it's opbjects such as recordsets and the database object.
2- Have a look to the permissions especially in windows 2000.
3- Verify that all instances of the application use the same version of DAO.
4- Because the database gets corrupt frequently then no one may gain execlusive access to it so you can write an error handler code to catch the 3343 error number and repair the database then release then re-open it. You can but the repair code in a module to be called each time the database got corrupt. It's not an ultimate solution but something's better than nothing.
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, in the event new items have been created since this listing was pulled.

http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20142853.html
http://www.experts-exchange.com/questions/Q.20142859.html


PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding this question here on closing recommendations if this item remains inactive another three days.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange


P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
Thank you for returning and finalizing this question.

Please take an extra moment when you grade questions less than an "A" to comment as to why.  This helps not only the experts who have helped you, but also others in the future who may access this question to get help.  If you've found alternative solutions to achieve your goal and add it here, it further adds value to this item which has not moved to our PAQ (Previously Asked Question database).  Anytime that you need our help, for example, if the grade was chosen in error, let us know by posting a zero point question in the Community Support with the URL to the question involved, we're happy to help.  The points to you are the same, regardless of grade assigned, but the expert points which flow are directly impacted by grades assigned.  There is more about this in the HELP DESK link regarding Questions and Answers.

Thanks,
Moondancer - EE Moderator
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now