Results 1 to 5 of 5

Thread: [SOLVED]Excel, VBA to MySQL?

Hybrid View

  1. #1
    Hyperactive Member
    Join Date
    Aug 2004
    Location
    Bloomingdale, IL USA
    Posts
    284

    Re: Excel, VBA to MySQL?

    I use an Oracle database and this is how I connect to our DB (except I use Msdaora for my provider)... maybe if you do some changing around it will work for you.

    vb Code:
    1. Dim Conn As ADODB.Connection
    2. Dim rsRec As ADODB.Recordset
    3.  
    4. Set Conn = New Connection
    5.  
    6. Conn.ConnectionString="Provider=MySQLProv;Database=astramedia;Uid=root;Pwd=Password;"
    7. Conn.Open
    8.  
    9. Set rsRec = New ADODB.Recordset
    10. rsRec.CursorType = adOpenKeyset
    11. rsRec.LockType = adLockOptimistic
    12. rsRec.ActiveConnection = Conn

  2. #2

    Thread Starter
    Member
    Join Date
    May 2010
    Posts
    33

    Re: Excel, VBA to MySQL?

    Thanks for the reply Chrissy!

    Unfortunately I continue to get errors. Here is the correct translation of the last error:

    Run-time error '-2147467259(80004005)':

    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
    I followed some help on the Internet regarding to create a System DSN and not a User DSN. However this did not change anything and the error message stays the same.

    Using the method suggested by Chrissy i get a different error:

    Run-time error '3706':

    Unable to find the specified provider. It is possible that it has not been installed correctly.
    So, I guessed changing Provider to Driver will give me different result.. And yes it throws me back to exactly the same error message as before (first one quoted)..

    I am running out of ideas..
    Could this be because I am running the Database on the same PC that I want to connect from?

    Regards, thanks for further help!

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width