Linux MDB ODBC problem

In this forum you can discuss database related issues which can be wxWidgets related, but also generic in nature.
Post Reply
Pat Verner
Earned a small fee
Earned a small fee
Posts: 16
Joined: Mon Sep 06, 2010 6:58 am

Linux MDB ODBC problem

Post by Pat Verner »

Hi there
Using WxWidgets-2.8.10 under Linux/GTK I work very happily using wxDb to access a MySQL database.
I now have the requirement to import some data from a "Jet4" type database into the main MySQL database, for which purpose I am trying to access the Jet4 database using the (very limited) ODBC driver from "MDB-TOOLS".

I can read the Jet4 data happily using isql, or using perl with "SDBI:ODBC:DSN". However, if I try using wxDb, then when I try to connect to the database I get a SIGSEV, ie:
140 bmDbConnectInf = new wxDbConnectInf(NULL,"bm12"); // ,"","","");
(gdb) n
141 bmDb = wxDbGetConnection(bmDbConnectInf);
(gdb)

Program received signal SIGSEGV, Segmentation fault.
0xb78165e1 in wxStringBase::AllocBeforeWrite ()
from /usr/local/lib/libwx_base-2.8.so.0

Getting back trace:
#0 0xb78165e1 in wxStringBase::AllocBeforeWrite ()
from /usr/local/lib/libwx_base-2.8.so.0
#1 0xb7816efa in wxStringBase::AssignCopy ()
from /usr/local/lib/libwx_base-2.8.so.0
#2 0xb7816f74 in wxStringBase::operator= ()
from /usr/local/lib/libwx_base-2.8.so.0
#3 0xb78df7f6 in wxDb::getDataTypeInfo ()
from /usr/local/lib/libwx_base_odbc-2.8.so.0
#4 0xb78e0418 in wxDb::determineDataTypes ()
from /usr/local/lib/libwx_base_odbc-2.8.so.0
#5 0xb78e0be1 in wxDb::open () from /usr/local/lib/libwx_base_odbc-2.8.so.0
#6 0xb78e0cef in wxDb::Open () from /usr/local/lib/libwx_base_odbc-2.8.so.0
#7 0xb78e17ca in wxDbGetConnection ()
from /usr/local/lib/libwx_base_odbc-2.8.so.0
#8 0x08050d43 in MyApp::OnInit (this=0x806b480) at main.cpp:141
#9 0x0805132c in wxAppConsole::CallOnInit (this=0x806b480)
at /usr/local/include/wx-2.8/wx/app.h:76
#10 0xb77f41fa in wxEntry () from /usr/local/lib/libwx_base-2.8.so.0
#11 0x08050f99 in main (argc=Cannot access memory at address 0x726567
) at main.cpp:120
--------------------
The odbc.ini entry is:
[bm12]
Description = MDB
Driver = /usr/local/lib/libmdbodbc.so
Database = /pwork/xxxxxxxx.mdb
Server = localhost
DSN = bm12
USR =
PASSWORD =
Trace = Off


--------------------
If I move the code to the Win platform, the Microsoft Driver seems to work fine. I would however like to get the working on my main development platform!

Any suggestions would be welcome!
=Pat
Post Reply