11.2. How can I use Interchange with Microsoft Access?
Though Interchange has ODBC capability, the Microsoft Access ODBC driver is not a network driver. You cannot access it on a PC from your ISP or UNIX system.
However, you can turn it around. Once you have created a MySQL or other SQL database on the UNIX machine, you may then obtain the Windows ODBC driver for the database (MySQL has a package called myODBC) and use the UNIX database as a data source for your PC-based database program.
Here is a quick procedure that might get you started:
- Get MySQL from:
Install it on your UNIX box. On LINUX, it is as easy as getting the RPM distribution:
You install it by typing, as root, rpm -i mysql-3.XX.XX.rpm. If you are not root, you will have to build the source distribution.
- To avoid permissions problems for your testing, stop the MySQL daemon and allow global read-write access with:
mysqladmin shutdown safe_mysqld --skip-grant-tables &
Obviously, you will want to study MySQL permissions and set up some security pretty quickly. It has excellent capability in that area, and the FAQ will help you get over the hurdles.
- Set up a database for testing on the UNIX machine:
mysqladmin create test_odbc mysql test_odbc
Make an SQL query to set up a table, for example:
mysql> create table test_me ( code char(20), testdata char(20) ); Query OK, 0 rows affected (0.29 sec) mysql> insert into test_me VALUES ('key1', 'data1'); Query OK, 1 rows affected (0.00 sec) mysql> insert into test_me VALUES ('key2', 'data2'); Query OK, 1 rows affected (0.00 sec) mysql>
- Get and install myODBC, also from the MySQL site:
You install this package on your Windows 95 or NT box. It is a simple setup.exe process which leads you to the control panel for setting up an ODBC data source. Set up a data source named test_odbc that points to the database test_odbc on the UNIX box. You will need to know the host name and the port (usually 3306).
- With Microsoft Access, you can then open a blank database and select: File/Get External Data/Link Tables. Select File Type of 'ODBC databases' and the proper data source, and you should have access to the database residing on the UNIX side.
Copyright 2002-2004 Interchange Development Group. Copyright 2001-2002 Red Hat, Inc. Freely redistributable under terms of the GNU General Public License.