7 replies
by dryflies
The problem has a few parts to it:
extracting the file from the message,
importing into Mysql.
All of this can be done with a script.
If you use VB you can access the outlook object model to extract the file. then you would either use a mysql procedure (sorry I am a bit thin on MySql) or ODBC to insert the data into the database.
So the short answer is it can certianly be done.
You won't find anyone that would do it for points.
by aldanatech
Poster rated this answer.
by jaqui
depending on the contents of the text file.
if delimited with a comma or semicolon between entries, you break it into an sql query.
add insert into( list, table, fields, here ) values(the,contents,of,the,text,file);
repreat insert statement for every full entry in the text file. ( ie for every line with no word wrap )
by aldanatech
Poster rated this answer.
MySQL does have a LoadFile pseudo command, but it's very problematic in certain respects.
First of all it's not a permission you want to hand out to all and sundry.
2nd if you are replicating.
The file has to exist until the command to load it is successfully replicated.
Also at least under Linux, it really likes the file to be in the same directory as the the database files.
I had a look at this for a regular import of data ftp'd from 3rd party windows box and gave up.
Ended up writing a perl script to ftp get the file, open it up and import it to the database.
Do you need the data in the database ?
Perl or PHP can open up the file and use it to create a web page ?
Shout back it you want some examples from file onwards.
by aldanatech
Poster rated this answer.
by aldanatech
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending