LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Need tool to export Access database (https://www.linuxquestions.org/questions/linux-software-2/need-tool-to-export-access-database-4175647583/)

mfoley 02-04-2019 12:54 AM

Need tool to export Access database
 
Is there some tool better than mdb-tools for exporting Access database tables? mdb-export is essentially useless. An example:
Code:

# mdb-export  HWW\ Membership\ Database.mdb tbl_Member_List |head -2
MemberID,MemberStatus,Member First Name,MI,Member Last Name,Address Line 1,Address Line 2,City,State,Zip,E-mail,Home Phone,Cell Phone,Work Phone,Preferred contact method,Birthdate,Date of RA,PHP/Officer,Notes
"","","Active","",,"Crowell","Nathaniel","1326 Main St.","","Columbus","GA","43266-7206","crowell@booga.com","614538-1066","12/30/99 00:00:00","",,"","E-mail"

Notice that the all-important primary key, MemberID, is empty. The data row has an extra column between MemberID and MemberStatus, throwing the rest off. There are another two bogus data columns between MemberStatus and Member First Name. Member Last Name is missing entirely, as are other columns. This simply will not work. Suggestions?

dc.901 02-04-2019 07:06 AM

Is the Windows machine where the DB was running still available?
If yes, may be this will help (may be you have already looked at this):
http://cdn.cdata.com/help/DCB/odbc/p...nodbclinux.htm

JSkywalker 02-04-2019 08:08 AM

What happens if you add this parameter '-b octal' (see man page)

What types are the columns that have empty values?
(in other words, what is the output of 'mdb-schema HWW\ Membership\ Database.mdb ')

mfoley 02-04-2019 11:55 AM

Quote:

Originally Posted by dc.901 (Post 5957515)
Is the Windows machine where the DB was running still available?
If yes, may be this will help (may be you have already looked at this):
http://cdn.cdata.com/help/DCB/odbc/p...nodbclinux.htm

No, the Windows machine is not available and I don't have a Windows machine with Access. The objective is for the .mdb file to be emailed as an attachment and a sendmail alias on the recipient machine runs a script to extract and import the database rows.
Quote:

Originally Posted by JSkywalker (Post 5957539)
What happens if you add this parameter '-b octal' (see man page)

What types are the columns that have empty values?
(in other words, what is the output of 'mdb-schema HWW\ Membership\ Database.mdb ')

-b is not an option on this mdb-export. Not in man page either. The version of my mdbtools is 0.5.
Code:

CREATE TABLE tbl_Member_List
 (
        MemberID                        Text (510),
        MemberStatus                    Text (510),
        Member First Name                      Text (510),
        MI                      Text (510),
        Member Last Name                        Unknown 0x00 (510),
        Address Line 1                  Text (510),
        Address Line 2                  Text (510),
        City                    Text (510),
        State                  Text (510),
        Zip                    Text (510),
        E-mail                  Text (510),
        Home Phone                      Text (510),
        Cell Phone                      Text (510),
        Work Phone                      Text (510),
        Preferred contact method                        DateTime (Short) (8),
        Birthdate                      DateTime (Short) (8),
        Date of RA                      Long Integer (4),
        PHP/Officer                    Text (510),
        Notes                  Text (510)

);

CREATE TABLE tbl_member_status_control
 (
        MemberStatus                    Text (510),
        StatusDescription                      Text (510),
        Active                  Boolean,
        Dues                    Boolean,
        DuesText                        Text (510)

);

All text fields appear to be 510 bytes(?). Doesn't help explain why MemberID is empty and why there is an extra column after MemberID and two extra columns after MemberStatus (and others). The Member Last Name is of unknown data type, which certainly explains why that column is missing altogether. That one I can have the owner fix.

In fact, MemberID is not the primary key as far as this scheme shows.

mfoley 02-04-2019 03:17 PM

I downloaded mdbtools version 0.7.1 from github and that appears to shown column names and columns correctly. I'll do some more testing and post back if this solves the problem.

mfoley 02-05-2019 02:10 AM

After more testing, it seems that version 0.7.1 fixes all the issue I was having with version 0.5. I got the 0.5 version from the SlackBuilds repository. I will see about suggesting the the package maintainer that he upgrade to the 0.7.1 version.

JSkywalker 02-09-2019 06:15 AM

Quote:

Originally Posted by mfoley (Post 5957857)
After more testing, it seems that version 0.7.1 fixes all the issue I was having with version 0.5. I got the 0.5 version from the SlackBuilds repository. I will see about suggesting the the package maintainer that he upgrade to the 0.7.1 version.

maybe you should also suggest the maintainer to add an option to query the version number of this tool

something like:
Code:

$ mdb-export -V
I was doing this from:
Code:

luuk@ACER:/mnt/c$ uname -a
Linux ACER 4.4.0-17763-Microsoft #253-Microsoft Mon Dec 31 17:49:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux


mfoley 02-10-2019 09:19 PM

Quote:

Originally Posted by JSkywalker (Post 5959718)
maybe you should also suggest the maintainer to add an option to query the version number of this tool

something like:
Code:

$ mdb-export -V
I was doing this from:
Code:

luuk@ACER:/mnt/c$ uname -a
Linux ACER 4.4.0-17763-Microsoft #253-Microsoft Mon Dec 31 17:49:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux


Yes, the ability to see the version number would be nice. I had determined the 0.5 version number because that's what the SlackBuilds download had. Likewise with the git hub site for version 0.7.1. It seems that if you don't have access to the build tar/zip files, there's no way to know what version of mdbtools you're using.

The SlackBuilds package maintainer is not the developer, so he cannot add a -V option. All he does is create a package from some repository, maybe even github, and insures it will run on Slackware. uname will tell you nothing about the mdbtools version.


All times are GMT -5. The time now is 09:38 AM.