Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you set up a data source for MySQL from an website/server 1

Status
Not open for further replies.

SBendBuckeye

Programmer
May 22, 2002
2,166
US
Client needs to link an Access database on the desktop to a MySQL database on a web site. How do you create the data source to link a table in Access? Can this be done?

Thanks for any help/suggestions you can give me!

Have a great day!

j2consulting@yahoo.com
 
Yes SBendBuckeye , can be done - and as usual with Access - can be done lots of different ways.

First off - you need to install the ODBC driver for MySQL onto your machine ( and every other machine that is going to act as a desk top front end to the MySQL db. )
( MySQL ODBC installer can be downloaded from the >ySQL web site )
I leave the install file on the central server and run it over the network on each machine I need it on. But it is small enough to fit onto a floppy if you want to 'carry it with you'.

Then in Access you have options
You can LINK to it in very much the same way as you link tables between a split Access db. This is a Read/Write link.

You can create PassThrough queries which are just SELECT queries that read directly from the ODBC source. This approach makes good use of the Client/Server structure because the WHERE clause in the PTQuery is evaluated at the MySQL end. Thus minimising Network traffic and time.
However SELECT PT Queries are READ ONLY

You can Open ADODB.Recordsets in VBCode. All you need is to modify the rst.ActiveConnection line to the ODBC source instead of the usual CurrentProject.Connection
This option is either Read only or Read/Write depending on how you set up the recordset.



Hope thats enough to get you started.



Graham
 
Thanks a lot for the very helpful response!

Have a great day!

j2consulting@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top