From: Matt <ma...@ky...> - 2003-10-30 16:42:17
|
I'm working on something kinda similar for a small web host who is just migrating to a linux box (RH7.3) from windows. Some of the more brain dead users want to continue uploading access dbs using frontpage or ftp. Initially I was hoping to use mdb-tools odbc drivers in combo with SunONE ASP to make everything dead simple, but no can do. But it sounds like I'm having a bit more luck than you. I've given up trying to automate the table creation itself - that'll be a one-shot thing so I'm resigned to doing it by hand. What I want is for users to continue to publish databases, and for the actual data import to happen automatically. I'm writing a perl daemon to do it: basically it creates a fifo in the spot where the access db would normally be, with the same name. The daemon then listens on the other side, pipes the incoming file to a temp file, then launches mdb-export to make a csv, then uses mysqlimport to plug that data into tables. There's ugly stuff with line-breaks inside columns and two-digit years in date fields, but think I got that sorted. The problems really fly if there's stuff in a table that mdb-tools just can't deal with, but so far so good. The code still isn't complete, but drop me an email off list if you'd like to steal it. > Putting single or > double quotes around the table and field names as previously suggested > doesn't help. Back ticks are your friends :) Matt |