Linux MDB ODBC problem

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

Linux MDB ODBC problem

Postby Pat Verner » Tue Oct 25, 2011 3:41 pm

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);

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

Getting back trace:
#0 0xb78165e1 in wxStringBase::AllocBeforeWrite ()
from /usr/local/lib/
#1 0xb7816efa in wxStringBase::AssignCopy ()
from /usr/local/lib/
#2 0xb7816f74 in wxStringBase::operator= ()
from /usr/local/lib/
#3 0xb78df7f6 in wxDb::getDataTypeInfo ()
from /usr/local/lib/
#4 0xb78e0418 in wxDb::determineDataTypes ()
from /usr/local/lib/
#5 0xb78e0be1 in wxDb::open () from /usr/local/lib/
#6 0xb78e0cef in wxDb::Open () from /usr/local/lib/
#7 0xb78e17ca in wxDbGetConnection ()
from /usr/local/lib/
#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/
#11 0x08050f99 in main (argc=Cannot access memory at address 0x726567
) at main.cpp:120
The odbc.ini entry is:
Description = MDB
Driver = /usr/local/lib/
Database = /pwork/xxxxxxxx.mdb
Server = localhost
DSN = bm12
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!

Return to “Database Related”

Who is online

Users browsing this forum: No registered users and 1 guest