DBFToMySQL icon indicating copy to clipboard operation
DBFToMySQL copied to clipboard

How can i solve this ?

Open Ariyatep-zz opened this issue 8 years ago • 6 comments

When i run php dbf-import.php, it say: php Fatal error: Uncaught Error: Class 'XBase\Memo' not found ...

17690890_1405727666161019_748376703_n

Ariyatep-zz avatar Apr 04 '17 03:04 Ariyatep-zz

edit php to require with absolute path and rename folder from 'DBFToMySQL' to be lower case.

I use this script but I need to adjust many things to make it usable such as numeric insert or null data.

ethaizone avatar Apr 14 '17 07:04 ethaizone

Adding a line to dbf-import.php fixes it for me: #6 @include "classes/XBase/Memo.php";

adanielvv avatar May 30 '17 13:05 adanielvv

@ethaizone Can you share your adjustments? I'm especially interested in a fix for null data in dates.

I use this script but I need to adjust many things to make it usable such as numeric insert or null data.

adanielvv avatar May 30 '17 13:05 adanielvv

@DanielvV Thank you. I'll try. I fix for null data in date by SET GLOBAL sql_mode=''; in mysql.

Ariyatep-zz avatar May 31 '17 10:05 Ariyatep-zz

@Ariyatep , FYI: I created a fork for testing and personal use. There I implemented and edited some of the old import_dbf() function into import_dbf_to_mysql() That fixed the null data for me (changes it to january first, 1970), and support for logical fields (L). Some other changes:

  • mb_convert_encoding() didn't have support for encoding CP437, changed it to iconv()
  • edited DBFhandler {} class to return column type
  • doubled the with of every character field (C) because it was giving errors (highly suspect that the converted special chars needed more space)

adanielvv avatar May 31 '17 11:05 adanielvv

+1 https://github.com/doofpot/DBFToMySQL/pull/6 is needed for XBase\Memo.

vjardin avatar Sep 18 '18 20:09 vjardin