From owner-freebsd-ports@FreeBSD.ORG Sat Jun 24 01:07:49 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22A0916A492 for ; Sat, 24 Jun 2006 01:07:49 +0000 (UTC) (envelope-from suporte@wahtec.com.br) Received: from a.mx.wahtec.com.br (carmichael.wahtec.com.br [200.96.65.149]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EF9E43D5E for ; Sat, 24 Jun 2006 01:07:46 +0000 (GMT) (envelope-from suporte@wahtec.com.br) Received: (qmail 11679 invoked from network); 24 Jun 2006 01:07:24 -0000 Received: from unknown (HELO [192.168.0.229]) (arisjr@[192.168.0.229]) (envelope-sender ) by a.mx.wahtec.com.br (qmail-ldap-1.03) with SMTP for ; 24 Jun 2006 01:07:24 -0000 Message-ID: <449C91D0.30407@wahtec.com.br> Date: Fri, 23 Jun 2006 22:13:52 -0300 From: Aristeu Gil Alves Jr User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: dbf2mysql - importing memo tables X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2006 01:07:49 -0000 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);