From: <dav...@ya...> - 2003-12-03 08:57:45
|
Hi, First, a caveat. I don't "know" how to program in C, I have some idea with (mostly) scripting languages, and get a headache whenever I try to read up about pointers. I wanted to be able to use mdb-tools to dump data from Access tables to mysql, in a similar fashion to mysqldump. Even though http://mdbtools.sourceforge.net/ talks about MySQL as far as I could see there is no MySQL backend. So, with very little idea of what I was doing I managed to hack in a backend for MySQL into backend.c and made some other (mostly cosmetic) changes to some of the other files. [I want to spend more time checking to make sure I have mapped the most appropriate column types]. I also copied and hacked mdb-export.c and created mdb-dump-data.c which creates INSERT statements instead of exporting data as a CSV file. Finally I created a script (that I have called mdbdump) that combines mdb-schema and mdb-dump-data to create a schema and INSERT statements in a similar fashion to mysqldump. This means that I can now get an Access table straight into MySQL with the following one-liner: mdbdump accessdb accesstable | mysql mysqldb I would not call myself a programmer nor a developer but these (and other) changes seem to work and might be useful for others. What should I do with them? Use diff to create patches? If so, who should I send them to and how? Thanks. Dave PS. I should point out that I am using version 0.5rc2 after applying combined patches by David Mansfield. ===== David Whiting Adult Morbidity and Mortality Project (AMMP) Box 65243, Dar es Salaam, Tanzania Tel: +255 22 211 6145 Fax: +255 22 212 3289 ________________________________________________________________________ Download Yahoo! Messenger now for a chance to win Live At Knebworth DVDs http://www.yahoo.co.uk/robbiewilliams |