Solved

ODBC  error

Posted on 2000-04-25
12
551 Views
Last Modified: 2008-03-10
I have a Visual Basic application that doesn't work. I use Odbc, file dsn, and an Access Database in the Application.

The error when I try to run is:

Connect:  Application-defined or object-defined error. 40002 IM003: Specified driver could not be loaded due to
system error 1157 (Microsoft Access Driver (*.mdb)). D due to system error 1157 (Microsoft Access Driver
(*.mdb)).


Please let me know if you have the anwer, thanks.
0
Comment
Question by:tinman1412
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 1

Accepted Solution

by:
lochiano earned 100 total points
ID: 2749551
Application-defined or object-defined error is a very generalized error in that if the DLL that you are calling does something stupid (as in not knowing what driver to use to see the DB) then that is one of the generalized messages that VB can get back.  There is another error that is inside of the DLL but normally you do not see that.

The first thing that I would do if I was you and that is to see if this is isolated to one PC or is this all over the place.

Next, make sure that the PC is up to date.  For example is this is a Windows 95 box then is DCOM and MDAC up to date?  Have you loaded all of the VB service packs.

If that does not do it then I would try to see if the problem can be reproduced in some other application.  What does Excel do when you try to access the same file?  VB has a good wizard for connecting into ODBC files and that could show you the connect string that it is using.

Try another connection method.  IF CreateObject() is giving you problems, then try creating an  (dim RS as new ADODB.Recordset) ADO object.  If VB does not work and Excel can see the file correctly then use ODBC to go to excel, then to the database.  It will be slow but you can see how it is being done there.

Go into the ODBC manager and drop the name and put it back in.  If the object created is an Oracle object then be sure to make a SQLPlus connection to verify that you can bet to the database in question.

Watch enviroment varables.  You can kill a Oracle session by not having the path statement set correctly.

Bottom line.  There may not be an easy answer to your question.



0
 
LVL 3

Expert Comment

by:jjmartin
ID: 2749553
Download Microsofts component checker.  Component Checker checks installed version and diagnoses installation issues with Microsoft Data Access Components.  This should identify and correct your problem.  It is available at:


http://www.microsoft.com/downloads/release.asp?ReleaseID=15754
0
 
LVL 1

Expert Comment

by:lochiano
ID: 2751197
I agree that the program offered is very good, but do not overlook a little good common sense.
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

Author Comment

by:tinman1412
ID: 2755924
I've installed a setup that updates the Microsoft Access Components, and it works, but it messes up my odbc setting for other applications. Does anyone know why?

system I'm running this on is Win 95,if this makes a difference
0
 
LVL 1

Expert Comment

by:lochiano
ID: 2755992
Which version MDAC and did you install or reinstall DCOM95?
0
 

Author Comment

by:tinman1412
ID: 2756053
I only installed MDAC version 2.1
0
 
LVL 1

Expert Comment

by:lochiano
ID: 2756062
I have seen several issues  with MDAC version 1.5 to MDAC version 2.5. Programs run with one or the other but not both.

I am guessing that you have some programs that were compiled with the older version and some that were compiled with the newer copy.  If that is the cane then the only solution is to recompile the old stuff using the newer stuff.

0
 

Author Comment

by:tinman1412
ID: 2756102
Well, I've tested my application on 2 other computers and they both work, it's just one in particular does not and I'm confused as to why.

All 3 computers are win 95
0
 
LVL 1

Expert Comment

by:lochiano
ID: 2756348
We have several hundred VB programs. All of them use MDAC.  3 would not work when we went from 1.5 to 2.15 The operating did not make any difference)  From 2.15 to 2.5 we have had not known errors.

We did not persue it much because at the same time we were interesting in making some other changes but I would half to guess it was the version of one of the dependent objects of the MDAC driver that did not like something else.
0
 

Author Comment

by:tinman1412
ID: 2756673
If MDAC mess up my other odbc settings, would a newer version of DCOM do the same?
0
 
LVL 1

Expert Comment

by:lochiano
ID: 2756702
We have never seen that. DCOM95 seems to be DCOM95.
0
 

Expert Comment

by:JamesADaly
ID: 3323714
I've been pulling my hair out over a similiar problem. The error  that would come up on certain machines during installation of a vb app I had written would be, "specified driver could not be loaded...system error...microsoft access driver.."

In the end we managed to fix it by copying ODBCJT32.dll from a machine the application worked on to the problem machine and this fixed it.

On the problem machine it was version 3.xx and on a machine that worked okay it was 4.xxx

James
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month8 days, 20 hours left to enroll

615 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