# Writing to DBF

**URL:** <https://www.ruby-forum.com/t/writing-to-dbf/145122>\
**Category:** Ruby\
**Created:** [August 6, 2008, 8:18am UTC](https://www.ruby-forum.com/t/writing-to-dbf/145122 "2008-08-06T08:18:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gustin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f0a364/32.png) [@gustin](https://www.ruby-forum.com/u/gustin)\
**Post date:** [August 6, 2008, 8:18am UTC](https://www.ruby-forum.com/t/writing-to-dbf/145122/1 "2008-08-06T08:18:45Z")

</div>

Hey Gang,  
I am attempting to write to a DBF, Visual FoxPro specifically, in  
support of a legacy application.

```
We are using the dbf gem with great success in reading, but need

```

to write back to the dbf.

```
Anyone have experience with this?

```

~)o  
gustin  
entryway software development  
[http://www.entryway.net](http://www.entryway.net)

---

<div class="post-metadata">

**Author:** ![gustin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f0a364/32.png) [@gustin](https://www.ruby-forum.com/u/gustin)\
**Post date:** [August 11, 2008, 8:20am UTC](https://www.ruby-forum.com/t/writing-to-dbf/145122/2 "2008-08-11T08:20:58Z")

</div>

gustin wrote:

> Hey Gang,  
> I am attempting to write to a DBF, Visual FoxPro specifically, in  
> support of a legacy application.
> 
> ```
> We are using the dbf gem with great success in reading, but need
> 
> ```
> 
> to write back to the dbf.
> 
> ```
> Anyone have experience with this?
> 
> ```

Hi Gustin

I just posted on my blog about reading from DBF but unfortunately  
haven’t yet needed to write to one. I hope you’ll post back if you  
manage to?

By the way, if you look at the project’s home page @ RubyForge [  
[http://rubyforge.org/projects/dbf/](http://rubyforge.org/projects/dbf/)] it says:

> DBF is a small fast library for reading dBase, xBase, Clipper and  
> FoxPro database files. It is written completely in Ruby and has no  
> external dependencies.

There’s no mention of writing!

Cheers,  
Mohit. [Blog - [http://notepad.onghu.com](http://notepad.onghu.com) ]  
8/11/2008 | 2:17 PM.

---

<div class="post-metadata">

**Author:** ![gustin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f0a364/32.png) [@gustin](https://www.ruby-forum.com/u/gustin)\
**Post date:** [February 5, 2009, 1:25am UTC](https://www.ruby-forum.com/t/writing-to-dbf/145122/3 "2009-02-05T01:25:43Z")

</div>

gustin wrote:

> Hey Gang,  
> I am attempting to write to a DBF, Visual FoxPro specifically, in  
> support of a legacy application.
> 
> ```
> We are using the dbf gem with great success in reading, but need
> 
> ```
> 
> to write back to the dbf.
> 
> ```
> Anyone have experience with this?
> 
> ```
> 
> ~)o  
> gustin  
> entryway software development  
> [http://www.entryway.net](http://www.entryway.net)

Hi, gustin.

Not sure if you still need it - but here is a write up on my blog about  
how to read/write to dbf files - i just ran into the same problem myself  
and was looking for info - so once I found a solution I thought it might  
help you.

[http://www.gorbikoff.com/2009/02/03/how-to-read-and-write-to-dbf-database-file-from-ruby/](http://www.gorbikoff.com/2009/02/03/how-to-read-and-write-to-dbf-database-file-from-ruby/)

Nick.
