Quote:
Originally posted by Mandragonus
How can I access to a MySQL database running on a linux server? I will have to establish an internet connection. Is there any experience amongst this forum with sending SQL Queries out on Visual Basic? I read something with an ODBC driver for acces from MySQL, but some say this will not work from Windows to Linux....
Please give me a hint. I go crazy about this, its so complicated...
|
ODBC works fine.
Get the latest version of ODBC driver from
www.mysql.com
Install it, and go to ODBC configuration located in Control Panel and create new DSN enter the host ip, username, password
This is the example of ADO connection from
www.mysql.com which is working for me:
Dim myconn As New ADODB.Connection
Dim myrs As New Recordset
Dim mySQL As String
Dim myrows As Long
myconn.Open "DSN=MyODBCsample"
mySQL = "SELECT * from user"
myrs.Source = mySQL
Set myrs.ActiveConnection = myconn
myrs.CursorLocation = adUseClient
myrs.Open
myrows = myrs.RecordCount
myrs.Close
myconn.Close