mdb-schema databasename.mdb mysql - problems

"Lukasz Szybalski" <[email protected]> Fri, 23 Nov 2007 14:29:10 -0600
Newsgroups gmane.comp.db.mdb-tools.devel
Message-ID <[email protected]>
Hello,
mdb-schema databasename.mdb mysql
FYI

Trying to convert ftp://ftp.nhtsa.dot.gov/manufacture/manufacturer.mdb to mysql

Few error I came across.
1. Your script is not checking from length. It created fields
varchar(501) where in mysql limit is 255.
2. The 'drop table tablename' statement should be "drop table if
exists tablename"
3. table names are not quoted. CREATE TABLE 565 should be CREATE TABLE `565`
4. Column names are not quoted.
CREATE TABLE `565`
 (
        MFG NAME                 varchar (255),
 should be
CREATE TABLE `565`
 (
       ` MFG NAME`                 varchar (255),
This also applies to mdb-export while doing insert statement.
5. Not sure if you know this but there is no comma ',' at the end of
each insert statement. which can be added using SED on a fly:
mdb-export -I manufacturer.mdb WMI | sed -e 's/)$/)\;/' |mysql -u
username -p database_name

Other then that the program is great. Thanks for having it. I had to
fix these things manually. It would be nice if that was done inside
the software.

Thanks a lot.
Lucas

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/