[body 3]

MiniVend Tech Tip No. 5

How can I use MiniVend with Microsoft Access?

Though MiniVend 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:

  1. Get and install mySQL on your UNIX box. On Linux it is as easy as getting the RPM distribution and typing (as root) rpm -i mysql-3.XX.XX.rpm. If you are not root, you will have to build the source distribution.

  2. 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.

  3. Set up a database for testing on the UNIX machine:

        mysqladmin create odbc_test
        mysql odbc_test
    

    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>
    

  4. Get and install myODBC 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 odbc_test that points to the database odbc_test on the UNIX box. You will need to know the host name and the port (usually 3333).

  5. With MS-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 voila! You should have access to the database residing on the UNIX side.