# Access and MDB file from Linux

**URL:** <https://www.ruby-forum.com/t/access-and-mdb-file-from-linux/69481>\
**Category:** Rails\
**Created:** [September 21, 2006, 10:15am UTC](https://www.ruby-forum.com/t/access-and-mdb-file-from-linux/69481 "2006-09-21T10:15:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![badger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3bc359/32.png) [@badger](https://www.ruby-forum.com/u/badger)\
**Post date:** [September 21, 2006, 10:15am UTC](https://www.ruby-forum.com/t/access-and-mdb-file-from-linux/69481/1 "2006-09-21T10:15:50Z")

</div>

I need to get read only access to a MDB database accessed from a Linux  
box using samba, anyone had any luck with this and know how to set it  
up?

Please resist from posting your reasons why and MDB should not be used,  
I am the converted so stop preaching. The MDB is there to stay and I  
have to read to it.

thanks

---

<div class="post-metadata">

**Author:** ![badger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3bc359/32.png) [@badger](https://www.ruby-forum.com/u/badger)\
**Post date:** [September 21, 2006, 11:59am UTC](https://www.ruby-forum.com/t/access-and-mdb-file-from-linux/69481/2 "2006-09-21T11:59:19Z")

</div>

Hi Craig,  
All rails supported adapters are listed here:  
[http://wiki.rubyonrails.org/rails/pages/DatabaseDrivers](http://wiki.rubyonrails.org/rails/pages/DatabaseDrivers)  
as you will see, MDB is not one of them (and not in the require list  
either)

---

<div class="post-metadata">

**Author:** ![badger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3bc359/32.png) [@badger](https://www.ruby-forum.com/u/badger)\
**Post date:** [September 21, 2006, 12:46pm UTC](https://www.ruby-forum.com/t/access-and-mdb-file-from-linux/69481/3 "2006-09-21T12:46:48Z")

</div>

If you’re feeling adventurous you could go with jruby on rails, the  
java-ness gives it access to ActiveRecord-jdbc which I imagine can read  
mdb.

Fred

---

<div class="post-metadata">

**Author:** ![badger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3bc359/32.png) [@badger](https://www.ruby-forum.com/u/badger)\
**Post date:** [September 21, 2006, 1:56pm UTC](https://www.ruby-forum.com/t/access-and-mdb-file-from-linux/69481/4 "2006-09-21T13:56:05Z")

</div>

Check out mdbtools:

[http://mdbtools.sourceforge.net/](http://mdbtools.sourceforge.net/)

It’s read-only access for now, but that appears to be what you need.  
There is a converter from MDB to other DBs, and a simple SQL engine for  
basic queries. Depending on the size of your database, you could  
possibly dump the mdb to MySQL (or whatever your Rails db is), and then  
create some kind of sync.

Alternatively, you could automate some kind of dump on the Windows side  
(if that’s available) to CSV’s (or a delimited txt format), and then  
read those in from your samba-connected Linux box.

---

<div class="post-metadata">

**Author:** ![badger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3bc359/32.png) [@badger](https://www.ruby-forum.com/u/badger)\
**Post date:** [April 19, 2007, 9:11pm UTC](https://www.ruby-forum.com/t/access-and-mdb-file-from-linux/69481/5 "2007-04-19T21:11:13Z")

</div>

You might give ActiveMDB a try.

It requires that you compile the MDB Tools Curtis S. mentioned, but  
then it gives you an ActiveRecord-ish wrapper around them.

weblog: [http://www.automatthew.com/](http://www.automatthew.com/)  
rdoc: [http://activemdb.rubyforge.org/activemdb](http://activemdb.rubyforge.org/activemdb)  
rubyforge: [http://rubyforge.org/projects/activemdb/](http://rubyforge.org/projects/activemdb/)
