Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    4

    Unanswered: Trying to access a MySQL database on a linux Server from MS Access

    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...

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: Trying to access a MySQL database on a linux Server from MS Access

    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

  3. #3
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    4
    ika, you are magnificent, I try this tomorrow. If I get it running I give you a big thank you (if you give me your em ail to my add ress mandragonus at h o t mail dot com)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •