<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>errr-online.com &#187; Conversion</title>
	<atom:link href="http://www.errr-online.com/index.php/tag/conversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.errr-online.com</link>
	<description>Be on the lookout for useless Information</description>
	<lastBuildDate>Sun, 30 May 2010 04:48:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Export xBase/dBase files into MySQL</title>
		<link>http://www.errr-online.com/index.php/2010/01/04/export-xbasedbase-files-into-mysql/</link>
		<comments>http://www.errr-online.com/index.php/2010/01/04/export-xbasedbase-files-into-mysql/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 18:18:36 +0000</pubDate>
		<dc:creator>errr</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Conversion]]></category>
		<category><![CDATA[dBase]]></category>
		<category><![CDATA[Export]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[xBase]]></category>

		<guid isPermaLink="false">http://www.errr-online.com/?p=6</guid>
		<description><![CDATA[If you have an application that uses xBase/dBase files to store data you may at some point need to export that data into a real database, like MySQL. This is a really simple task thanks to a nifty app called dbf2mysql. For my example I was using some CRM software called ACT. They used dBase [...]]]></description>
			<content:encoded><![CDATA[<p>If you have an application that uses <a href="http://en.wikipedia.org/wiki/DBase">xBase/dBase</a> files to store data you may at some point need to export that data into a real database, like <a href="http://www.mysql.com/">MySQL</a>. This is a really simple task thanks to a nifty app called <a href="http://sourceforge.net/projects/dbf2mysql/">dbf2mysql</a>. For my example I was using some CRM software called ACT. They used dBase III files to store their data. So I just went to the windows box that was holding my dBase file. I used winscp to move it to my Linux box. Next I used:<br />
<blockquote>dbf2mysql -vvv -c -f -d dbname -r -U dbuser -P dbuserpass CustomerInfo.dbf</p></blockquote>
<p>What this does is turns up the verbose logging to my screen, next the -c will create a table in my database named &#8220;test&#8221; (this is default and can be changed with the -t flag) -f makes all the field named from the dbf file be changed to lower case, next the -d, -U, and -P seem pretty obvious, and that leaves us with the -r which will Trim trailing and leading white space from CHAR type fields. All this info and more can be found in the man page. Here is the trail end of what I got from the output of my command:<br />
<blockquote>fields in dbh 71, allocated mem for query 4293, query size 2156<br />
Inserting records<br />
Inserting record 0<br />
Inserting record 100<br />
Inserting record 200<br />
Inserting record 300<br />
Inserting record 400<br />
Inserting record 500<br />
Inserting record 600<br />
Inserting record 700<br />
Inserting record 800<br />
Closing up&#8230;.
</p></blockquote>
<p>Now I can log into phpmyadmin and verify that all my data has been moved successfully.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.errr-online.com/index.php/2010/01/04/export-xbasedbase-files-into-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
