Forum Moderators: open

Message Too Old, No Replies

Access to mySQL

Exporting from Access into mySQL...

         

mipapage

2:08 pm on Feb 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey all...

Situation
A client currently uses an MS Access db for their website. They make changes in-house and upload the new db automatically every night:

Office Access db ->UPLOAD-> to Server.

We're doing a redesign for them that includes moving to a mySQL db on the server:

Office Access db ->EXPORT/IMPORT -> mySQL -> UPLOAD-> to Server.

Question
Is there a good/easy/proper etc. way to accomplish what they were doing before but including getting the data into mySQL?

The site will be on a LAMP setup

mipapage

6:05 pm on Feb 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<shameless> Bump!

jatar_k

8:37 pm on Feb 13, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Seems like a good way to me

they export csv from access
you have an upload script that reads and inserts into db

Is that what you mean?

mipapage

9:09 pm on Feb 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Seems like a good way to me

I guess so. Things is, I have no idea how to do it. When I googled I ran into software solutions, from what you are telling me I can cook up a script to do this? Maybe I should go and hit the mySQL functions over at php.net...

jatar_k

10:56 pm on Feb 13, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Essentially the steps involved re fairly simple taken one at a time.

I assume manual export from access which leaves you with a csv file

Your Script

start with a standard upload style form
they click browse, select file, click upload

You upload and move to a dir you can work with

You can use the Basics of extracting data from CSV files [webmasterworld.com]

For Step4 you would reorganize the fields, if needed, into the order you like for your db

Step5 - instead of writing to file you would build and execute your mysql INSERT query

Step7 - close connection instead of file pointers

fairly straight forward when you boil it down

mipapage

11:32 pm on Feb 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks jatar_k,

fairly straight forward when you boil it down

Yes, well thank you for that! Sometimes I just don't know what to cook with...

In this case, 'Basics of extracting data from CSV files' was a missing ingredient

ergophobe

8:22 pm on Feb 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have a different solution. Depending on the setup it may or may not be better.

Use a VBA script that will output SQL and upload that. I use the one at

[cynergi.net...]

It is free and unsupported. There are some things to wathc out for.

* carefully read the notice about Microsoft DAO 3.6

* You can adjust the max size for a blob/memo field. It's supposed to go up to 64KB, but I get buffer overflows with blob/memo fields beyond about 40kb.

* If you have any system columns (as when you use replication) in your table, you will want to create a Make Table query in Access to get rid of these before exporting.

Tom

mipapage

8:35 pm on Feb 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey Tom, thanks.

I had actually spotted another post where you mentioned this. I tried it and looked out for the erros/problems but it choked somewhere. I'll give it another shot and let you know how it goes.

(how'd you come across this old post?}

defanjos

4:58 am on Feb 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am doing a lot of Access to MySQl migration, and I have been using a program called Access-to-MySQL - it works very well.

It is not free, but for $39 it is not bad at all.

Of course, I have no affiliation with them, I just use the program and am happy with it.

ergophobe

8:43 pm on Feb 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




I tried it and looked out for the erros/problems but it choked

How so? How big is the Access DB you're talking about (in MB I mean?). Mine is only 17MB and it takes about 5 minutes for the script to run, so maybe it just needed more time?


(how'd you come across this old post?}

Continuing ed. At least once a week I try to read through a forum that concerns a topic I know nothing about - surprised to be able to contribute here.

Tom

TheMagic

9:31 am on Mar 11, 2004 (gmt 0)



Hi folks... I would suggest to take a look at any synchronizing tools for Access/MySQL ... I've tried some and was quite satisfied with the results, especially I liked the a2m from [data-conversions.net...] as they offer 5 full runs, then I needed to perform just a mdb->mysql conversion and 5 times that was good and free... donot consider this as some ad... I'm just new here and want to help... all the best

mipapage

9:51 am on Mar 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'll have a look, thanks. I've managed to change things locally for development and testing, however I have yet to figure out what we will be implementing once live...

TheDave

4:21 am on Mar 16, 2004 (gmt 0)

10+ Year Member



Can you make a local page, one that extracts the data from the Access DB, puts it in some form fields (hidden?) then posts that to the server. That way no one has to export, just load a local page and press submit. Server then takes the data and puts it in the DB. I would be looking at ways to reduce the data being updated also, rather than updating the whole DB every time, just update those parts that need updating.

mipapage

6:54 am on Mar 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



TheDave,

Right now I'm also looking into myODBC [mysql.com] which, from past experience with odbc, should do what you are after in terms of simply updating new data.

mipapage

7:07 pm on Mar 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Still pecking away at this, though crunch time is soon. A little program over here [bullzip.com] was quite nice and quite free, and did a great job at gettin an access db into mySQL hassel free.

txbakers

7:15 pm on Mar 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just export from Access to text files (tab delimited) and then import into mySQL.

mipapage

1:13 am on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This topic has swooned a bit and so I moved it over here [webmasterworld.com].