Export Data from Microsoft Access database

How could I leverage Ruby to export mdb tables definations, data, forms,
queries and then be able to import it in to some other dbms like
oracle/db2
etc?

Regards,
Jatinder

Jatinder S. wrote:

How could I leverage Ruby to export mdb tables definations, data, forms,
queries and then be able to import it in to some other dbms like
oracle/db2
etc?

Regards,
Jatinder

On WIndows, there is ODBC, of course, and there’s an “Access engine”
that has part of the functionality of the real thing. If you have an
Access license, there’s OLE/DCOM.

On Linux, try unixODBC or mdbtools
(http://sourceforge.net/projects/mdbtools/). I’m not sure if any of
these (other than OLE/DCOM) are accessible directly from Ruby yet.

On 7/24/06, M. Edward (Ed) Borasky [email protected]ain.invalid wrote:

that has part of the functionality of the real thing. If you have an
Access license, there’s OLE/DCOM.

On Linux, try unixODBC or mdbtools
(http://sourceforge.net/projects/mdbtools/). I’m not sure if any of
these (other than OLE/DCOM) are accessible directly from Ruby yet.

I did some work using Ruby and Access. I wrote some of my findings on
RubyGarden:
http://wiki.rubygarden.org/Ruby/page/show/ScriptingAccess

Les

On 7/24/06, Jatinder S. [email protected] wrote:

How could I leverage Ruby to export mdb tables definations, data, forms,
queries and then be able to import it in to some other dbms like oracle/db2
etc?

Regards,
Jatinder

Not ruby, but there is a collection of great little command line tools
for exporting access databases. http://mdbtools.sourceforge.net/.

Can I use mdbtools on Windows platform? the reason I am asking this is
bcos
I do not seem to get installation/configuration info of mdbtools info
for
Windows platform.
Am I missing something here? could you please assist me if you have any
info
on the same.

Regards,
Jatinder

Jatinder S. wrote:

Regards,
Jatinder

Not ruby, but there is a collection of great little command line tools
for exporting access databases. http://mdbtools.sourceforge.net/.

If they’re open source, they might be compilable/executable in CygWin.
But on a Windows system, you can probably do what you want using ODBC.
Just create a dataset name pointing to you MDB file and issue ODBC
queries. You might need some other Microsoft query utilities and you
might have to construct SQL in your Ruby code; I don’t use Ruby on
Windows so I don’t know if there’s an ODBC connection capability in
Ruby.

M. Edward (Ed) Borasky wrote:

Jatinder

But on a Windows system, you can probably do what you want using ODBC.
Just create a dataset name pointing to you MDB file and issue ODBC
queries. You might need some other Microsoft query utilities and you
might have to construct SQL in your Ruby code; I don’t use Ruby on
Windows so I don’t know if there’s an ODBC connection capability in Ruby.

There is. I’ve used Ruby-ODBC for extracting from Access to MySQL
before. Not in any particularly clever manner, mind you, but it
works…

Leslie,

I came across your findings.
I am wondering if this(migration of all access tables including
relationships and data) has been achieved in other languages as well
like
Java,VBA, etc. and is still to be achieved in Ruby.
I am looking at some library which could help me with mapping of
datatypes
and differences between Access and Oracle/DB2; I can do it from scratch
but
that would be my last option.

Regards,
Jatinder

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs