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

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
chopficaro
Forum Commoner
Posts: 68
Joined: Fri Jan 01, 2010 12:56 am

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

Post 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
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

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

Post 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.
chopficaro
Forum Commoner
Posts: 68
Joined: Fri Jan 01, 2010 12:56 am

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

Post 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
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

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

Post 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:
chopficaro
Forum Commoner
Posts: 68
Joined: Fri Jan 01, 2010 12:56 am

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

Post 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
Post Reply