Page 1 of 1

DBF and MySQL fields

Posted: Fri Apr 28, 2023 6:36 am
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?

Re: DBF and MySQL fields

Posted: Fri Apr 28, 2023 6:56 am
by serge_girard
DBF memo is terrible! I use VARCHAR for pure text and BLOB for files etc.

Serge

Re: DBF and MySQL fields

Posted: Fri Apr 28, 2023 2:07 pm
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

Re: DBF and MySQL fields

Posted: Fri Apr 28, 2023 2:13 pm
by serge_girard
Thanks Dragan!