Home / Samples.
If you require further technical support then Email : Support@it.nuigalway.ie.
This page is a simple example of how to connect to a MySQL database running on a remote machine. View the
source by logging in with your ftp client and viewing the files in the
"samples" subdirectory.You can also scroll to end of this file for the code
The connection is made using DSN-Less connections. This example connects to a remote machine (danu.it.nuigalway.ie) which is running MySQL. It connects to a
MySQL sample database, NorthWind, and retrieves a record set of the data in the "Customers" table. The User is "browser" and
password is "browser".
For a DSN-Less connection you need to specify the driver to be used for the database.
The only difference from this page and one using Access is in the connection string :
adoCon.Open "DRIVER={DATABASE DRIVER};Server=DATABASE server;database=database name;uid=username;pwd=password"
The actual values used in this example Is at the End of the page. The connection String used:
adoCon.Open "DRIVER={MySQL ODBC 3.51 Driver};Server=danu2.it.nuigalway.ie;database=****;uid=*****;pwd=****;"
ALFKI | Alfreds Futterkiste | Maria Anders | Sales Representative | Obere Str. 57 | Berlin | |
ANATR | Ana Trujillo Emparedados y helados | Ana Trujillo | Owner | Avda. de la Constitución 2222 | México D.F. | |
ANTON | Antonio Moreno Taquería | Antonio Moreno | Owner | Mataderos 2312 | México D.F. | |
AROUT | Around the Horn | Thomas Hardy | Sales Representative | 120 Hanover Sq. | London | |
BERGS | Berglunds snabbköp | Christina Berglund | Order Administrator | Berguvsvägen 8 | Luleå | |
BLAUS | Blauer See Delikatessen | Hanna Moos | Sales Representative | Forsterstr. 57 | Mannheim | |
BLONP | Blondesddsl père et fils | Frédérique Citeaux | Marketing Manager | 24, place Kléber | Strasbourg | |
BOLID | Bólido Comidas preparadas | Martín Sommer | Owner | C/ Araquil, 67 | Madrid |
Name | Phone | Room | Location |
" & rsTest("Name") & " | " Response.Write rsTest("Phone") & " | " & rsTest("Address") & " | " Response.Write rsTest("City") & " |