I'm by no means an authority on this kind of stuff but you could write a
portable C program that generates a big ol' SQL script containing INSERT
INTO statements :)
I can't really think of a fast way to do it since you want to go between
MySQL and Access without ODBC and other utilities (I'm not even sure if
there is a bulk copy that would work between the two?).
That's my two cents worth anyway,
David Ayliffe wrote:
> I need some advice on how to export a tables data to import later into
> This export HAS to be automated (and I'm using VC++ API for MySQL)
> The problems I'm faced with are
> (1) Before I can import this data into access I have to create the table
> in access; I'm familiar with ADO and creating both tables and databases
> automatically in a C++ proggie, but how can I find out the tables
> structure - I suppose I can issue a query - "DESCRIBE thistable;"
> (2) Adding records to access (ADO will have methods to do this thought I
> would have thought).
> (3) The biggest problem I can see is getting the data from a mysql
> server (where-ever it may be) to reside locally (the computer issuing
> the command) so that I can then reference it and add it to an access
> database through ADO. How can I get this data (effectively a "select *
> from to table") to reside on the local machine. Ideally what I want is
> "export * from table to file.txt" - I know I'm wishing on a star here.
> What's the easiest way to do this thought?
> How can I use a SELECT to send the output to a file??
> (4) I will need to insert data into MySQL. I've learnt that I can do
> this with a LOAD DATA ... But is this issued in the same way as a query
> is sent to the server. It is essential to add data through the mysql
> server not an add-on program shipped with MySQL.
> I have a problem that I don't want the overhead of ODBC, or the reliance
> on other programs bundled with MySQL because the host I'm connecting to
> could be Windows, Linux, Unix Sparc etc...
> Have a think and I'll appreciate any input you have to offer. Please
> bear in mind that all operations MUST BE AUTOMATED.
> Thank you for your time.
> Thanks lots
> David Ayliffe (mail@stripped)
|• SQL Problem||David Bruha||19 Mar|
| • Re: EXPORTING DATA: OK, this might be a bit general but..||Erik Gillespie||20 Jun|