Solved

Import Dbf to MySQL Automaticaly (like a DTS in SQL)

Posted on 2003-10-28
5
1,060 Views
Last Modified: 2011-09-20
Hi, I need some help, sorry but my english is not good...
weel.. I´ll try to explain... I must publish a database in the web and I´am using MySQL, the source are Dbf files...And needs to be refreshed whit the latest rows.
I need a program that schedule that job, and I have no idea which I have to use...
Please, HELP MEEEEEEEE!!!!!!! :-(
Thanks
Leandro  
0
Comment
Question by:budadormilon
5 Comments
 
LVL 17

Accepted Solution

by:
Squeebee earned 63 total points
Comment Utility
Can you schedule the output of the rows to CSV? If so, you can schedule the input of the rows from CSV.
0
 
LVL 2

Assisted Solution

by:doryllis
doryllis earned 62 total points
Comment Utility
I would suggest an export from your original file format to a delimited form (something where there is a separating character between each field in a simple ASCII-type file) .  I prefer to use the | (pipe) character if there is any chance of commas in your data. MySQL automatically assumes that the delimiting character is a tab.

Once you have your data file, you can use MySQL LOAD DATA INFILE syntax to pull in the delimited file.

From a MySQL prompt

LOAD DATA INFILE '/localpath/filename.txt'
   INTO TABLE table_name
   FIELDS TERMINATED BY ','  --This line can be changed to indicate whatever your field delimiter is.

If all of the data in your file fits the table name then your fine.  Otherwise, if you run into problems you can fool around with the text file itself and see if there are loose characters around.  There are also more options available for the LOAD DATA INFILE command.

Good Luck,
Dory
0
 

Expert Comment

by:bradylanter
Comment Utility
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Creating and Managing Databases with phpMyAdmin in cPanel.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now