cyberemissary / mdbtools Goto Github PK
View Code? Open in Web Editor NEWThis project forked from brjohnsn/mdbtools
MDB Tools - Read Access databases on *nix
Home Page: http://mdbtools.sourceforge.net
License: GNU General Public License v2.0
This project forked from brjohnsn/mdbtools
MDB Tools - Read Access databases on *nix
Home Page: http://mdbtools.sourceforge.net
License: GNU General Public License v2.0
please see mdbtools#116 and this issue maybe solved the #10 for winbuntu
all of your must made a template library in the sources, that packagers will install in /usr/share/mdbtools-odbc or whatever named the odbc package part.. as:
[MDBTools]
Description = MDBTools Driver
Driver = @odbcpath@/libmdbodbc.so
Setup = @odbcpath@/libmdbodbc.so
the odbc install/configure process will replace the @odbcpath@/
with the install odbc driver module path..
in the documentation odbc part (that only has few lines) replace with that of course, install/configure will replace the @Datapath@ with proper user installation path:
The MDBTools project provide and ODBC driver module.. Currently supports mdb, accdb and mdt file types and SQL support are very basic and limited.
First install the odbc driver module and the mdbtools odbc packages, to provide the odbc driver module library
odbcinst -i -d -r -f @datapath@/mdbodbcinst.ini
If all are good, will registered automatically the MDBTools driver module for usage, console does will show output that count increase raised by 1 as:
odbcinst: Driver installed. Usage count increased to 2.
Target directory is /etc
There's no way to create mdb files for linux, so we must have a mdb test file for that, we assumed have a mdb/accdb file prepared with a table named table1 with at least one column named columna1 of type TEXT inside, localled at the /tmp/workingdb directory, the mdb-tool from mdbtools package can be used for testing:
mdb-sql /tmp/workingdb/testdb.mdb
1 => SELECT * FROM tabla1
2 => go
+--------------------------------------------------------------------------+
|columna1 |
+--------------------------------------------------------------------------+
|asdasd |
+--------------------------------------------------------------------------+
1 Row retrieved
1 => quit
Create a ODBC DSN access entry point named odbcsmdb in the system wide odbc.ini file for the testdb.mdb database file, there's no options for odbc.ini file like other module drivers in this case:
[odbcsmdb]
Description=MDB limited odbc access to testdb.mdb
Driver = MDBTools
Database =/tmp/workingdb/testdb.mdb
Now lest try to test the odbc DSN access with isql command line tool from unixodbc package installation of the linux OS as:
isql odbcmdb -v
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select * from tabla1
+--------------------------------------------------------------------------+
|columna1 |
+--------------------------------------------------------------------------+
|asdasd |
+--------------------------------------------------------------------------+
SQLRowCount returns 1
1 rows fetched
SQL> quit
NOTE on MDBTools library the supported SQL syntax is a very limited subset and deficient in several ways.
IMPORTANT CONSIDERATIONS
if both original and this package are installed seems will have some problems connecting
as i noted in makefile.in
EXTRA_DIST = HACKING libmdb.pc.in libmdbsql.pc.in CHANGELOG.md README.md
library odbc conection names does not are changed! so that package name renamed are unusefully!
Thanks for your work on mdbtools
. This solves one problem for us. It would seem good to merge your work upstream and release an updated mainstream version: any reason not to do so?
I'm available for help if necessary.
Cheers.
I'm working on a branch that removes the dependency on GLib (and by extension, gettext). The strategy is to provide a small shim file (when GLib is absent) with the necessary #defines and substitute functions.
Any interest in a pull request?
I'm trying to build mdbtools-v0.8.2
on Linux, Mac, Windows and FreeBSD using BinaryBuilder. It successfully builds on Linux, Mac and FreeBSD.
Here's a link to the pre-built binaries if anyone is interested:
https://github.com/JuliaBinaryWrappers/mdbtools_jll.jl/releases/tag/mdbtools-v0.8.2%2B0
However, when Windows is the target, it fails with the error in the title.
Here's the relevant section of the log:
[22:30:24] /bin/sh ../../libtool --tag=CC --mode=compile cc -DPACKAGE_NAME=\"mdbtools\" -DPACKAGE_TARNAME=\"mdbtools\" -DPACKAGE_VERSION=\"0.8.2\" -DPACKAGE_STRING=\"mdbtools\ 0.8.2\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mdbtools\" -DVERSION=\"0.8.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_ATTRIBUTE_ALIAS=1 -I. -I../../include -I/workspace/destdir/include/glib-2.0 -I/workspace/destdir/lib/glib-2.0/include -mms-bitfields -I/workspace/destdir/include -g -O2 -DSQL -Wall -MT parser.lo -MD -MP -MF .deps/parser.Tpo -c -o parser.lo parser.c
[22:30:24] /bin/sh ../../build-aux/ylwrap lexer.l lex.yy.c lexer.c -- flex -i -8
[22:30:24] /bin/sh ../../libtool --tag=CC --mode=compile cc -DPACKAGE_NAME=\"mdbtools\" -DPACKAGE_TARNAME=\"mdbtools\" -DPACKAGE_VERSION=\"0.8.2\" -DPACKAGE_STRING=\"mdbtools\ 0.8.2\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mdbtools\" -DVERSION=\"0.8.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_ATTRIBUTE_ALIAS=1 -I. -I../../include -I/workspace/destdir/include/glib-2.0 -I/workspace/destdir/lib/glib-2.0/include -mms-bitfields -I/workspace/destdir/include -g -O2 -DSQL -Wall -MT lexer.lo -MD -MP -MF .deps/lexer.Tpo -c -o lexer.lo lexer.c
[22:30:25] libtool: compile: cc "-DPACKAGE_NAME=\"mdbtools\"" "-DPACKAGE_TARNAME=\"mdbtools\"" "-DPACKAGE_VERSION=\"0.8.2\"" "-DPACKAGE_STRING=\"mdbtools 0.8.2\"" "-DPACKAGE_BUGREPORT=\"[email protected]\"" "-DPACKAGE_URL=\"\"" "-DPACKAGE=\"mdbtools\"" "-DVERSION=\"0.8.2\"" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 "-DLT_OBJDIR=\".libs/\"" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_ATTRIBUTE_ALIAS=1 -I. -I../../include -I/workspace/destdir/include/glib-2.0 -I/workspace/destdir/lib/glib-2.0/include -mms-bitfields -I/workspace/destdir/include -g -O2 -DSQL -Wall -MT mdbsql.lo -MD -MP -MF .deps/mdbsql.Tpo -c mdbsql.c -DDLL_EXPORT -DPIC -o .libs/mdbsql.o
[22:30:25] libtool: compile: cc "-DPACKAGE_NAME=\"mdbtools\"" "-DPACKAGE_TARNAME=\"mdbtools\"" "-DPACKAGE_VERSION=\"0.8.2\"" "-DPACKAGE_STRING=\"mdbtools 0.8.2\"" "-DPACKAGE_BUGREPORT=\"[email protected]\"" "-DPACKAGE_URL=\"\"" "-DPACKAGE=\"mdbtools\"" "-DVERSION=\"0.8.2\"" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 "-DLT_OBJDIR=\".libs/\"" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_ATTRIBUTE_ALIAS=1 -I. -I../../include -I/workspace/destdir/include/glib-2.0 -I/workspace/destdir/lib/glib-2.0/include -mms-bitfields -I/workspace/destdir/include -g -O2 -DSQL -Wall -MT parser.lo -MD -MP -MF .deps/parser.Tpo -c parser.c -DDLL_EXPORT -DPIC -o .libs/parser.o
[22:30:25] libtool: compile: cc "-DPACKAGE_NAME=\"mdbtools\"" "-DPACKAGE_TARNAME=\"mdbtools\"" "-DPACKAGE_VERSION=\"0.8.2\"" "-DPACKAGE_STRING=\"mdbtools 0.8.2\"" "-DPACKAGE_BUGREPORT=\"[email protected]\"" "-DPACKAGE_URL=\"\"" "-DPACKAGE=\"mdbtools\"" "-DVERSION=\"0.8.2\"" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 "-DLT_OBJDIR=\".libs/\"" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_ATTRIBUTE_ALIAS=1 -I. -I../../include -I/workspace/destdir/include/glib-2.0 -I/workspace/destdir/lib/glib-2.0/include -mms-bitfields -I/workspace/destdir/include -g -O2 -DSQL -Wall -MT lexer.lo -MD -MP -MF .deps/lexer.Tpo -c lexer.c -DDLL_EXPORT -DPIC -o .libs/lexer.o
[22:30:25] mdbsql.c: In function ‘mdb_sql_add_sarg’:
[22:30:25] mdbsql.c:463:3: warning: implicit declaration of function ‘localeconv’ [-Wimplicit-function-declaration]
[22:30:25] *p=localeconv()->decimal_point[0];
[22:30:25] ^
[22:30:25] mdbsql.c:463:18: error: invalid type argument of ‘->’ (have ‘int’)
[22:30:25] *p=localeconv()->decimal_point[0];
[22:30:25] ^
[22:30:25] make[3]: *** [Makefile:485: mdbsql.lo] Error 1
[22:30:25] make[3]: *** Waiting for unfinished jobs....
[22:30:25] libtool: compile: cc "-DPACKAGE_NAME=\"mdbtools\"" "-DPACKAGE_TARNAME=\"mdbtools\"" "-DPACKAGE_VERSION=\"0.8.2\"" "-DPACKAGE_STRING=\"mdbtools 0.8.2\"" "-DPACKAGE_BUGREPORT=\"[email protected]\"" "-DPACKAGE_URL=\"\"" "-DPACKAGE=\"mdbtools\"" "-DVERSION=\"0.8.2\"" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 "-DLT_OBJDIR=\".libs/\"" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_ATTRIBUTE_ALIAS=1 -I. -I../../include -I/workspace/destdir/include/glib-2.0 -I/workspace/destdir/lib/glib-2.0/include -mms-bitfields -I/workspace/destdir/include -g -O2 -DSQL -Wall -MT parser.lo -MD -MP -MF .deps/parser.Tpo -c parser.c -o parser.o >/dev/null 2>&1
[22:30:25] libtool: compile: cc "-DPACKAGE_NAME=\"mdbtools\"" "-DPACKAGE_TARNAME=\"mdbtools\"" "-DPACKAGE_VERSION=\"0.8.2\"" "-DPACKAGE_STRING=\"mdbtools 0.8.2\"" "-DPACKAGE_BUGREPORT=\"[email protected]\"" "-DPACKAGE_URL=\"\"" "-DPACKAGE=\"mdbtools\"" "-DVERSION=\"0.8.2\"" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 "-DLT_OBJDIR=\".libs/\"" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_ATTRIBUTE_ALIAS=1 -I. -I../../include -I/workspace/destdir/include/glib-2.0 -I/workspace/destdir/lib/glib-2.0/include -mms-bitfields -I/workspace/destdir/include -g -O2 -DSQL -Wall -MT lexer.lo -MD -MP -MF .deps/lexer.Tpo -c lexer.c -o lexer.o >/dev/null 2>&1
[22:30:25] mv -f .deps/parser.Tpo .deps/parser.Plo
[22:30:26] mv -f .deps/lexer.Tpo .deps/lexer.Plo
[22:30:26] make[3]: Leaving directory '/workspace/srcdir/mdbtools/src/sql'
[22:30:26] make[2]: *** [Makefile:379: all] Error 2
[22:30:26] make[2]: Leaving directory '/workspace/srcdir/mdbtools/src/sql'
[22:30:26] make[1]: *** [Makefile:375: all-recursive] Error 1
[22:30:26] make[1]: Leaving directory '/workspace/srcdir/mdbtools/src'
[22:30:26] make: *** [Makefile:473: all-recursive] Error 1
[22:30:26] ---> make -j${nproc}
[22:30:26] Previous command exited with 2
[22:30:26] Child Process exited, exit code 2
ERROR: LoadError: Build for mdbtools on x86_64-w64-mingw32 did not complete successfully
Full logs below:
I'm posting in case someone else has an idea of what might be going on.
I've tried several times to build on macOS Catalina 10.15.5 according to the directions given on the web page. When I run "autoreconf -i -f" I get several lines of "warnings" like these:
======cut below
src/gmdb2/help/Makefile.am:1: 'gnome-doc-utils.make' included from here
gnome-doc-utils.make:625: warning: patsubst C/%,%,$(_DOC_C_FIGURES: non-POSIX variable name
gnome-doc-utils.make:625: (probably a GNU make extension)
src/gmdb2/help/Makefile.am:1: 'gnome-doc-utils.make' included from here
======cut above
And then I get an error:
======cut below
src/libmdb/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/libmdb/Makefile.am:1: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/libmdb/Makefile.am:1: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/libmdb/Makefile.am:1: If 'LT_INIT' is in 'configure.ac', make sure
src/libmdb/Makefile.am:1: its definition is in aclocal's search path.
======cut above
I've tried and failed to address this error. Then, I tried to run "./configure --disable-man" and it
fails with this error:
config.status: error: cannot find input file: `src/util/Makefile.in'
Has anyone built for macOSX ... and I need a build for Win10 as well.
I want to export only selected columns from the .mdb file using a sql, how can I do that using mdb-export utility?
Hello,
can you please release a odbc driver in your repo?
Hi, I've been amassing a collection of patches fixing various bugs, buffer overruns, NULL pointer derefs, etc. In addition I've got things building on Travis CI and Appveyor, and also implemented a --disable-glib
compile-time flag. Are you interested in this work? I guess the larger question is how do we organize this project since the original author is AWOL.
The install page has instructions for adding a repository for installation of the package.
The instruction "echo "deb http://apt.cyberemissary.com/ubuntu/ xenial main" | sudo btee -a /etc/apt/sources.list.d/apt.cyberemissary.com.list" does not seem to work.
The RPM can be downloaded and I was able to install on Linux Mint 18 using alien.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.