How can I access a MySQL from Access 2003?

G

Guest

I want to build an Access front end for a MySQL database. I have downloaded
the MySQL ODBC driver, but I get an error every time I try to link to the db.
Any help would be appreciated.
 
J

Jeff Boyce

Any description of the error you get would be helpful...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Hi, I can link just fine to a MySQL database but when I open any table all I
see in all fields is "#Deleted". This seems like it might be a translation in
the driver. Any clues or no hope let me know!
 
R

Rick Brandt

Pat said:
Hi, I can link just fine to a MySQL database but when I open any
table all I see in all fields is "#Deleted". This seems like it might
be a translation in the driver. Any clues or no hope let me know!

If the primary key is a data type that Access/Jet doesn't have an exact match
for then this can happen. In some cases this problem only occurs when opening
the datasheet of the table directly (which is not really required anyway).
Build a form against the table and see if you still have the problem using the
form.

If you have control over the table design see if BigInteger, Numeric, or Decimal
is being used for the Primary Keys. Even DateTime or Timestamp can cause this
if they resolve to microseconds (Access only sees Timestamps to the second).
 
G

Guest

I updated MySql client and ODBC and still having the same problem even when
doing a form. Any other clues?
Regards,
Pat
 
G

G. Vaught

I vaguely remember having to download a special driver to link mySQL tables
into Access. I would search google for the driver.
 
G

Guest

I would revisit one the above replies about Primary Keys.

Here's steps that I discoverd saved me from the same issue you are asking
about:
1)If you are looking up the linked table(s) from a query, make sure all
PRIMARY KEYS are listed in the result set from the tables, even if didn't
want to show them, show them anyway.

2) Add a timestamp field to every MySQL table.

3) Add an INT field with the auto-increment attribute to EVERY table...you
may even have to return this field in the query in access as well(you can
hide it on the forms).

If you do the above steps, it will work! - At least it did for me :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top