DBF and MySQL fields

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

Post Reply
User avatar
dragancesu
Posts: 930
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

DBF and MySQL fields

Post by dragancesu »

It is not difficult to make a program that works with MySQL data

but the first step is to transfer data from DBF to MySQL, in MySQL there are probably all types, but not all, so the problem is how to transfer.
DBF has a LOGICAL field that MySQL does not have, TINYINT is a substitute
DBF has a MEMO field, and MySQL has several types that can replace it, which variant are you using, VARCHAR or TEXT or BLOB or something else?
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: DBF and MySQL fields

Post by serge_girard »

DBF memo is terrible! I use VARCHAR for pure text and BLOB for files etc.

Serge
There's nothing you can do that can't be done...
User avatar
dragancesu
Posts: 930
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: DBF and MySQL fields

Post by dragancesu »

Thank you Serge

Program in attachment create program for import, from dbf to mysql

1. build imp_gen
choice dbf and look imp<DBF>.prg

2. look line 12: PRIVATE cHostName:="localhost", cUserName:="prenos", cPassWord:="prenos", cDataBase:="prenos"
set your host, username, password and database

3. build imp<DBF>.prg

Note: if you are looking at this then I suppose you have basic knowledge of working with MySQL database
Attachments
import.zip
(10.78 KiB) Downloaded 118 times
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: DBF and MySQL fields

Post by serge_girard »

Thanks Dragan!
There's nothing you can do that can't be done...
Post Reply