LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-04-2019, 12:54 AM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,561

Rep: Reputation: 177Reputation: 177
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?

Last edited by mfoley; 02-04-2019 at 12:58 AM.
 
Old 02-04-2019, 07:06 AM   #2
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
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
 
Old 02-04-2019, 08:08 AM   #3
JSkywalker
Member
 
Registered: Aug 2007
Distribution: openSUSE
Posts: 102

Rep: Reputation: 24
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 ')

Last edited by JSkywalker; 02-04-2019 at 08:22 AM. Reason: added mdb-schema to question
 
Old 02-04-2019, 11:55 AM   #4
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,561

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by dc.901 View Post
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 View Post
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.

Last edited by mfoley; 02-04-2019 at 11:58 AM.
 
Old 02-04-2019, 03:17 PM   #5
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,561

Original Poster
Rep: Reputation: 177Reputation: 177
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.
 
Old 02-05-2019, 02:10 AM   #6
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,561

Original Poster
Rep: Reputation: 177Reputation: 177
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.
 
Old 02-09-2019, 06:15 AM   #7
JSkywalker
Member
 
Registered: Aug 2007
Distribution: openSUSE
Posts: 102

Rep: Reputation: 24
Quote:
Originally Posted by mfoley View Post
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
 
Old 02-10-2019, 09:19 PM   #8
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,561

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by JSkywalker View Post
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.
 
  


Reply

Tags
access, database, export



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] fstab or export options needed to write to an nfs mounted ntfs export chief427 Linux - General 2 07-21-2011 07:07 AM
why should we export COMPTOP and what does !export do ? shaiva Linux - Newbie 5 11-03-2009 03:44 PM
Database Programming (database to database transaction) johncsl82 Programming 7 02-02-2007 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration