General discussion

Locked

Import raw data to mySQL

By Aldanatech ·
I daily get an e-mail with a couple of text files with raw data in Outlook. Is there a way I can automatically import them to mySQL and publish them on a web site with Dreamweaver? This is Real Estate automating purposes.

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by dryflies In reply to Import raw data to mySQL

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.

Collapse -

by Aldanatech In reply to

Poster rated this answer.

Collapse -

by Jaqui In reply to Import raw data to mySQL

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 )

Collapse -

by Aldanatech In reply to

Poster rated this answer.

Collapse -

by Tony Hopkinson In reply to Import raw data to mySQL

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.

Collapse -

by Aldanatech In reply to

Poster rated this answer.

Collapse -

by Aldanatech In reply to Import raw data to mySQL

This question was closed by the author

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums