By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,972 Members | 1,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,972 IT Pros & Developers. It's quick & easy.

ODBC connection using Access

P: n/a
I am using Access 2K as a front end to MySQL running on a Linux server.
I am having trouble connectiong to the server. MySQL control centre connects
and I can connect using a DSN data source. But if I connect using the
following code

Dim constr As String
Dim tbl As DAO.TableDef

constr = "ODBC;DRIVER={MySQL ODBC 3.51 Driver};DESC=;USER=" & SQLServerUser
& ";DATABASE=" & SQLServerDatabase _
& ";SERVER=" & SQLServer _
& ";PASSWORD=" & SQLServerPassword _
tbl.Connect = constr
tbl.SourceTableName = MYTABLENAME
CurrentDb.TableDefs.Append tbl

I get a Cannot find installable ISAM error message when trying to append the
table. It appears that a connection is made but that I cannot access any of
the tables. I have tried using other connection methods and get the same

If I change the above to
& ";DATABASE=" & SQLServerDatabase _
& ";SERVER=" & SQLServer _
& ";PASSWORD=" & SQLServerPassword _

Where MYDSNCONNECTION is the DSN connection set up in the data sources, the
code works and the table is appended.
I would prefer to use the first method since I will not have to create the
DSN on every workstation.
Can anyone help me with this.
Jul 23 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.