MySQL and ODBC - Updating The Database (
Page 5 of 6 )
Figure 1-7 shows a simple GUI created using the MS
Access Form Wizard. After creating this GUI, I used it to insert a sample record
into the database.
Figure 1-7: Clients GUI

Create a GUI similar to the one shown above, and
experiment with inserting information into it. Immediately upon doing so,
connect to the MySQL database and execute a select * query on the clients table.
The table will show that it has been updated with the information entered using
the MS Access GUI! Figure 1-8 shows the clients table as seen from MS Access
after entering one record. Following Figure 1-8 is a view of the MySQL clients
table after executing a SELECT * query.
Figure 1-8: View of the clients
table from MS Access
mysql> select * from clients;
+----------+-----------------+-------+------------+----------------------------+
| clientId | name | state | telephone | email |
+----------+-----------------+-------+------------+----------------------------+
| 1 | Widget Fanatics | OH | 4125555678 | widgets@widgetfanatics.com |
+----------+-----------------+-------+------------+----------------------------+
To convince yourself that the synchronous updates occur
regardless of whether the update takes place from MS Access or directly from
MySQL, go ahead and delete the newly added row from within the MySQL monitor.
Then return to MS Access and reopen the clients table. You will see that the
data has disappeared!
For those readers new to MS Access, take some time
to experiment with the various Wizards made available from within the program.
Using these Wizards will better acquaint you with how Access works. However, to
tweak the various components of the Access interface to your specific needs, you
will need to learn how to modify the component properties manually. To learn
more about doing so, I would suggest searching the Web and consider purchasing
one of the many books available on the subject.