Solved

ODBC Connection

Posted on 2014-09-29
4
506 Views
Last Modified: 2014-09-29
Dim inNewConnetion As OdbcConnection = New OdbcConnection(String.Format("Driver={{Microsoft Access Driver (*.mdb, *.accdb)}}; Dbq={0}; Uid=admin; Pwd=;", inAccessDBName))

inNewConnection.Open()

When I try to open the connection I get the following error.  How do I fix this?

Unable to load odbcji32.dll

OS: Windows 8.1
Apps installed: MS Access 2013
0
Comment
Question by:Ray Turner
  • 3
4 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
Comment Utility
At a guess (the 32 in the error message) you have compiled your app as any cpu (or explicitly 64 bit cpu) which means it can't call a 32 bit dll.
The solution is to change the properties of your app so it compiles only as 32 bit.
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
Comment Utility
properties, build tab, platform target
0
 

Author Comment

by:Ray Turner
Comment Utility
After making the suggested change I get the following error:

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

What's needed to fix this?
0
 
LVL 44

Expert Comment

by:AndyAinscow
Comment Utility
That is a totally different question (sounds like the ODBC connection you want to use is not configured) , you ought to close this and ask a new question for that.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

14 Experts available now in Live!

Get 1:1 Help Now