Linux,wxWidgets2.6 ODBC works properly,but still "Unabl

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
jach
In need of some credit
In need of some credit
Posts: 5
Joined: Sun Jan 16, 2005 2:43 pm

Linux,wxWidgets2.6 ODBC works properly,but still "Unabl

Post by jach »

Hello group

Linux Mandrake 10.1, WxWidgets version 2.6 , MySQL server version 4.1.6-gamma-standard.

I'm trying from two days with wx/samples/db/.
I have instaled and configured ODBC. ODBC is OK. MySQL is OK.
ODBC connection to MySQL is OK.
(I checked it with DataManagerII, isql, odbctest)
But I sill obtain "Unable to connect to the data source..." when I'm trying to execute dbtest.

please find below description of whole configuration.
Any ideas what I'm doing wrong???

thanks for your help

tom

db sample configuration

dbtest.cfg file:

test
valid_user
valid_password


ODBC configuration

odbcinst.ini file:

[MySQL]
Description = MySQL ODBC
Driver = /usr/local/lib/libmyodbc3.so
Setup = /usr/local/lib/libodbcmyS.la

odbc.ini file:

[test]
Description = baza_mysql test
Driver = MySQL
Server = localhost
Database = test
Port = 3306

.odbc.ini file:

[test]
Description = baza_mysql test
Driver = MySQL
Server = localhost
Database = test
Port = 3306
jach
In need of some credit
In need of some credit
Posts: 5
Joined: Sun Jan 16, 2005 2:43 pm

solution is simple

Post by jach »

So I answer myself.

ODBC instalation path in my case was /usr/local/etc.
Because of it, aplication did't work until I moved odbcinst.ini and odbc.ini files to /etc directory.

Is it posible to set this directory? I suppose no. :(
Why we haven't for example wxDbConnectInf::SetDefaultODBCDir ?

jach
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Hi!
You can use the ODBCINI and IODBCINI variables I guess.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda