Discussion Locked

Converting an Access to MySQL database

0 helpful
20 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I've used the exportsql script, as well as others, to try to somehow convert an access database to a mysql database. I keep getting a type mismatch error on the script, at line 302. I am not sure what the problem is with it. The Access database can be located at:

http://www.rit.edu/~awb3667/751/751.mdb

If you want the best script I've been able to find, it's at www.cynergi.net/exportsql

Any questions, email me through this site, and I will post comments.

20 replies

by mark phelan

Extract From "Http://www.cynergi.net/exportsql/"

"I'm getting 'User defined type not defined' or 'Undefined data type' for data type 'database'" - this may happen under Access 2000. You need to go into Tools | References in Visual Basic and add "Microsoft DAO 3.6 object library". (thank you to all users that reported this issue, and the way to fix it)

This may be related...

by syscokid

I don't know much about this particular subject but I did some searching and came up with what may be alternative solutions:

http://www.iserver.com/support/virtual/mysql/odbc/

http://www.ispirer.com/products/

This one talks about Linux but you may be able to adapt it for Windows.

http://www.osfaq.com/article.php3?sid=76

(Sometimes when I cut and paste URL's it looks ok to me but once the answer is posted, an extraneous space will have crept in. Make sure you delete any extraneous spaces or the page won't load).

by raffi_

Hello. I'm not quie clear on the problem. I've got the DB and the conversion routine and it ran just fine. I have NOT executed the resulting SQL.

When you refer to a datatype mismatch are you getting this when you run the conversion in Access or when you run the resulting script in MYsql?

Regards
Raffi_

by blaine moore

Sorry, I needed an answer last night and you never sent me the script...I had to manually write the SQL out by hand, which was what I was trying to avoid.

by quentin smith

I are aware that Access Data structures differ from MySql data structure and your problem could be with this.
One potentail problem could be the conversion of OLE Objects ion Access being converted to MySql. Mysql uses Blobs to store these.
Another one could be memo Fields which equals Text fields.
I have no seen the Script that you talk about but maybe their could be a bug in the script that is related to these facts.

by blaine moore

The script takes care of the conversions, and we can edit the output before sending to a mySQL load job. I just don't can't get any output.

by blaine moore

If somebody could provide the script that is the output, I can't get it to run...or if somebody wanted to manually write a script out, I'd assign the points for that. I am needing it by tomorrow night or I am going to have to manually write it myself, unfortunately. Thanks.

by kgosnell

Try converting it to a third type, and then convert it to the mysql database, I have found on simpler issues , this works well.
It seems direct conversion at times , causes a conflict between similar codexes. A universal converter would use a third stable code that would not be close to the target code.
It's a shot , good Luck

by blaine moore

We didn't have anything else available last night and I had to write the SQL out by hand. We tried an entire new database, and even exporting one table at a time, but it was still breaking.

by gboudrea

Something easy and fast to try. Install the mySQL ODBC driver, create an ODBC connection to your mySQL DB server, open the DB in Access, export, choose file type "ODBC" (the last in the list of file types I think, then choose the ODBC mySQL connection you just made! Worked just fine for my DB last week... Should do for yours too I guess.. :)

Hope this work!

by shanghai sam

This does not work either. I tried that before posting the question, and tonight installed mySQL on windows and tried it that way, but it just does not like our database.

by kprice122

I have a friend who is very savie with SQL: Name: Phil Hagan
Phone: 858 552-8585 x3592
Tell him that I referred you. Let me know what happens

by kgosnell

This is an after thought, if you understand the code and registry, check and see if the primary drivers are loaded in the correct order, this is an old but relevent issue in all platforms, especially Microsoft, and can occur as a error output, once identified, simply rearrange the order. The biggest issue is going from one type to another, as they require a certain loading order , such as a pure Dos , and a shell such as a platform (MS), there are certain issues not normally faced that requirea specific load order, otherwise the bug would have been fixed long time ago, but it is a system specific bug, and not normally addressed by engineers.
Luck, Kyle
P.S. you find this issue all the time in Video driver loading, and ha,ha, has some interesting results.

This discussion is closed to new replies.