Can Linux extract data from .MDB file, and output to text ?

M

Michelle

Hi,

I have written a C program that translates text data extracted from
MS Access. This C program runs on Solaris or Linux (opensuse). This
C program works fine, so I need to have my main OS remain on Linux (or
Solaris).

In order to export data from the .mdb files right now, the users have
to manuallly open up each .mdb file through MS Access, open up which
Table they want, and then, export the contents of those tables into
different text files. This process is too cumbersome for the users.

One way to make this smoother is to do something like this (if it's
possible on Linux):

Extract contents from each Table from each .mdb file through the shell
in Linux automatically, something like this:

mdbtools <filename.mdb> <table name> <output_filename.txt>

If this works in Linux, then, when each .mdb file is being generated,
I can have it outputted to my Linux network drive, and then, simply
run a script on Linux to extract data from each Table from each of
those .mdb files, output the contents into an ASCII text file (s), and
then, call up my C program to translate that data.

But the question is, is this possible to do on the shell in Linux
(preferably opensuse):

mdbtools <filename.mdb> <table name> <output_filename.txt>
 
H

Hans Up

Michelle said:
But the question is, is this possible to do on the shell in Linux
(preferably opensuse):

mdbtools <filename.mdb> <table name> <output_filename.txt>

I don't know about opensuse. The mdbtools package for Ubuntu Jaunty
includes a command called mdb-export. So I can dump the contents of
tblFoo from sample.mdb to STDOUT in CSV format like this:

mdb-export sample.mdb tblFoo

Or include output redirection to capture the output in a file:

mdb-export sample.mdb tblFoo > capture.txt

So I think what you want *should* be easy; I'm just not sure about your
opensuse mdbtools version.

Good luck,
Hans
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top