Date: Fri, 23 Jun 2006 22:13:52 -0300 From: Aristeu Gil Alves Jr <suporte@wahtec.com.br> To: ports@freebsd.org Subject: dbf2mysql - importing memo tables Message-ID: <449C91D0.30407@wahtec.com.br>
next in thread | raw e-mail | index | archive | help
We were trying to import several dbf memo tables to our mysql database with dbf2mysql without success. The memo field was empty when importing. So, we found something that can possibily be a minor bug, at least for our foxpro database version. I hope it helps you too. Diff File follows. Cheers! -- Aristeu Gil Alves Jr WAH Tecnlogia de Informação -- *** work/dbf2mysql-1.14/dbf.c Sat Jul 8 00:19:51 2000 --- dbf.c Sat Jun 24 00:57:29 2006 *************** *** 570,577 **** switch(dbh->db_memo) { case DBF_MTYPE_FPT: ! blknum = get_long(dbffield); ! break; case DBF_MTYPE_DBT3: case DBF_MTYPE_DBT4: strncpy(fields[t].db_contents, (char *)dbffield, fields[t].db_flen); --- 570,583 ---- switch(dbh->db_memo) { case DBF_MTYPE_FPT: ! /*************************************************************** ! * Commented OuT ! * We use foxpro and this was getting BLKNUM bizzarre numbers. ! * Using dbt way is totally ok! this solved our issue importing ! * foxpro memo tables to mysql. ! ****************************************************************/ ! // blknum = get_long(dbffield); ! // break; case DBF_MTYPE_DBT3: case DBF_MTYPE_DBT4: strncpy(fields[t].db_contents, (char *)dbffield, fields[t].db_flen);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?449C91D0.30407>