Another idea that may work... and I say may because I have never done it myself. Is to use MyODBC drivers and do the import code native to Access.
I would be interested to hear if others have done this. Gerard -----Original Message----- From: Jeff Gannaway [mailto:[EMAIL PROTECTED]] Sent: Saturday, October 27, 2001 10:30 AM To: Daniel Harik; [EMAIL PROTECTED] Subject: Re: [PHP] Excel to MySQL At 04:11 PM 10/27/01 -0800, Daniel Harik wrote: >You see i have huge(for me) 100 000 record access table, i wanted to >convert it to mysql, i thought of making php convertor that uses odbc >and mysql, but maybe there is faster way? Daniel, You're making it too hard on yourself. 1. CREATE TABLES in MySQL that match up to your Access tables. 2. In MICROSOFT ACCESS, go to the Export... command (I believe it's under the File menu.) 3. You'll save it as a .txt file with NO TEXT QUALIFIERS, TAB DELIMITED, without having column names on the first row. 4. FTP the .txt file to your server. I always use ASCII mode for it because I remember one time having some problem which I think was due to Binary transfer (I could've been wrong about that, though). 5. Go into MySQL an use the LOAD DATA INFILE command. ie: LOAD DATA INFILE '/home/virtual/yoursite/home/html/filename.txt' REPLACE INTO tablename; The first few times it can be kind of sticky, but after you do it a couple fo times, it will be as easy as breathing. There is 1 compatibility issue that I ran into. If a field in MS ACCESS has data on 2 lines.... For instance... +----+-------------------------------+ | ID | Address | +----+-------------------------------+ | 1 | 123 Evergreen Terrace | <-- This is GOOD +----+-------------------------------+ | 2 | 321 Pine Street | <-- This is BAD | | Apartment A | +----+-------------------------------+ You see, when MySQL runs the LOAD DATA, new records are indicated by a NEW LINE. You'll want to check your ACCESS table for new lines before creating the export file. Later, Jeff Gannaway ___________________________________________________________ Save 15% on 2002 Calendars and Holiday Cards! http://www.AvantGifts.com Discount Code: hopper22ct Offer Good Through October 31, 2001 ___________________________________________________________ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]