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 Singh 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.

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

···

On 7/24/06, Jatinder Singh <jatinder.saundh@gmail.com> 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

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, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:

Jatinder Singh 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.

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

···

On 7/24/06, snacktime <snacktime@gmail.com> wrote:

On 7/24/06, Jatinder Singh <jatinder.saundh@gmail.com> 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/\.

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

···

On 7/24/06, Leslie Viljoen <leslieviljoen@gmail.com> wrote:

On 7/24/06, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:
> Jatinder Singh 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.

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

Jatinder Singh wrote:

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

> 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/\.

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.

···

On 7/24/06, snacktime <snacktime@gmail.com> wrote:

On 7/24/06, Jatinder Singh <jatinder.saundh@gmail.com> wrote:

M. Edward (Ed) Borasky wrote:

Jatinder Singh wrote:

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

> 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/\.

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.

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...

···

On 7/24/06, snacktime <snacktime@gmail.com> wrote:

On 7/24/06, Jatinder Singh <jatinder.saundh@gmail.com> wrote:

--
Alex