Page 1 of 1

converting .mdb to .sql then importing: primary key limit

Posted: Sat Nov 19, 2011 1:44 pm
by chopficaro
i have converted a microsoft .mdb file to an .sql file with a program called bullzip
whenever i try to import the sql file into a mysql database, weather through phpmyadmin or through the mysql console, it always gives me the error that they key is too long (max length 1000 bytes)
how do i shorten the key or make this problem go away?
thanks guys

Re: converting .mdb to .sql then importing: primary key limi

Posted: Sat Nov 19, 2011 2:16 pm
by califdon
It's pretty hard to know if you don't explain what they key is in the original .mdb.

I'm not familiar with bullzip, but I've always converted .mdb to MySQL by exporting the .mdb tables as comma separated files (.csv) and then importing them using phpMyAdmin.

Re: converting .mdb to .sql then importing: primary key limi

Posted: Sat Nov 19, 2011 4:56 pm
by chopficaro
i didnt know i could do that

how do i get it into a .csv file?
in microsoft access under external data i see options to export as:

excel
text filr
xml file
pdf
word
sharepoint
odbc
html
dbase

nothing about csv files

Re: converting .mdb to .sql then importing: primary key limi

Posted: Sat Nov 19, 2011 5:15 pm
by califdon
It may be slightly different in other versions of MS Access, but in Access 2003:
Under File menu, select Export, then at the bottom of the screen, drop down the Save As Type list and look for:
Text Files (*.txt, *.csv, *.tab, *.ask)
It's way down the list. Select that.
Then when you assign a filename, right above that, include the file extension .csv.

I know it's not obvious, but maybe Microsoft wasn't too eager to show you how to switch from Access to another database engine?
:wink:

Re: converting .mdb to .sql then importing: primary key limi

Posted: Sun Nov 20, 2011 8:47 am
by chopficaro
ROFL <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> M$ and their $OPA
thanks bro u fixed my problem