This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
/
tech5.html
79 lines (69 loc) · 2.47 KB
/
tech5.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<HTML>
<HEAD><TITLE>MiniVend Tech Tip</TITLE></HEAD>
[body 3]
<P ALIGN=CENTER>
<H1>MiniVend Tech Tip No. 5</H1>
<P>
<H2>
How can I use MiniVend with Microsoft Access?
</H2>
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.
<P>
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.
<P>
Here is a quick procedure that might get you started:
<OL>
<LI> Get and install <A HREF="http://www.tcx.se">mySQL</A>
on your UNIX box. On Linux it is as easy as getting the
<A HREF="http://www.tcx.se/rpm/">RPM distribution</A>
and typing (as root) <TT>rpm -i mysql-3.XX.XX.rpm</TT>. If you are not
root, you will have to build the source distribution.
<P>
<LI> To avoid permissions problems for your testing, stop
the mysql daemon and allow global read-write access with:
<PRE>
mysqladmin shutdown
safe_mysqld --skip-grant-tables &
</PRE>
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.
<P>
<LI> Set up a database for testing on the UNIX machine:
<P>
<PRE>
mysqladmin create odbc_test
mysql odbc_test
</PRE>
<P>
Make an SQL query to set up a table, for example:
<P>
<PRE>
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>
</PRE>
<P>
<LI> Get and install <A HREF="http://www.tcx.se">myODBC</A>
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 <TT>odbc_test</TT> that points
to the database <TT>odbc_test</TT> on the UNIX box. You will need to know the
host name and the port (usually 3333).
<P>
<LI> 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.
</UL>
</body></html>