Table structure (fields)
many records (data)
(text_file.txt)
"Copy and Paste" source code...
(dbf_to_mysql.prg)
procedure main()close alluse listproduct.dbfcopy fields code,name_produ,price to text_file.txt delimited with " "close allreturn
with
Create Database (hardware_products)
and create
MySQL Table: listproduct
"Copy and Paste" source code...
Type and Run this command in "MYSQL"
Type and Run this command in "MYSQL"
drop database hardware_products;create database hardware_products;show databases;use hardware_products;delimiter //create procedure create_table_listproduct()begincreate table listproduct(code varchar(10),name_produ varchar(50),price double(8,2));end //delimiter ;call create_table_listproduct();describe listproduct;
mysql>LOAD DATA INFILE "text_file.txt" INTO TABLE listproduct FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n';
mysql>select * from listproduct;
and ...
Download the file work.rar and extract:descargar el archivo comprimido work.rar y extraer los archivos:dbf_to_mysql.prg
text_file.txt
listproduct.dbf