MySQL and ODBC (
Page 1 of 6 ) Learn it from start to finish.
Installing MyODBC, creating a new data source through the ODBC Data Source Administrator, linking a MySQL database into a new MS Access database, and finally updating the MySQL database through an MS Access GUI.Although creating custom Web-based GUIs (Graphical User Interfaces) for your
MySQL backend is a fairly common method for administrating database information,
it is not without its problems. Slow Internet connections and cross-browser
coding issues are just a few issues that could inhibit your client from updating
their database information in the most timely and efficient way possible. Of
course, problems such as these are largely out of your control, but don’t try
telling that to the client! Well, if not a Web-based GUI, what then? The
alternative is actually a quite interesting one. You may not be aware that MySQL
is compatible with the ODBC (Open DataBase Connectivity) standard, and even
offers its own ODBC drivers (known as MyODBC) free for download from the MySQL
site ( http://www.mysql.com). This is great,
because MyODBC makes it possible to incorporate MySQL into quite a few
interesting applications, including Microsoft Access. In this article, I’ll
demonstrate just how easy it is to install and configure MyODBC and subsequently
use Microsoft Access to manage MySQL data. {mospagebreak title=MyODBC
Installation} The first step in the MyODBC installation process is to go to the
MySQL Website and download the latest version of the MyODBC drivers. They are
located at: http://www.mysql.com/downloads/api-myodbc.html.
Incidentally, the drivers are available for the Windows 95/98/NT, UNIX, and
Solaris platforms. However, since the demonstration will be devoted specifically
to integration with MS Access, it is assumed that either the 95/98 or NT version
of the drivers will be downloaded. To summarize the installation process:
1. Download the drivers from the URL given above. 2. Unzip it
using your favorite ZIP package. WinZip (http://www.winzip.com) is particularly popular
solution. 3. Click on Setup.exe. This will begin the installation
process. 4. A Welcome prompt will appear. Click Continue. 5. A Install
Drivers prompt will appear. Highlight the MySQL driver in the Available
ODBC Drivers box and press OK. 6. Installation of the various files will
begin. If you get an error referring to the MFC30.dll file, please read the Note
found below. Otherwise, proceed to step 7. 7. A ‘Data Sources’ prompt will
appear. Just press Close for now. 8. A Setup Succeeded! prompt
appears. Congratulations, MyODBC is now installed.
Note:
Installation problems relating to the MFC30.dll file are often encountered when
installing MyODBC. If error messages appear while installing MyODBC, there are
two options that I am aware of: 1. Restart Windows in Safe Mode (Press F8
during reboot). Once rebooted, perform the installation process as outlined
above. Then reboot once more, this time normally. 2. Edit the odbc.inf file,
deleting the line (only do this if using Windows 98/NT): "MFC" = 1,
mfc30.dll,,,, 1995-07-11, ,,, ,,,,,, 322832,,,, 3.2.0.0, The
boring installation part is complete. In the next section, a sample project will
be introduced, which will provide a practical basis for learning more about how
MyODBC is used as the interface between MySQL and MS
Access.
|