Page 1 of 1
No ODBC Drivers available?
Posted: Wed Sep 08, 2004 4:07 pm
by merendo
Cheers.
I am trying to code a little app which queries a MySQL server thru the database commands. But when I call ExamineDatabaseDrivers(), it just returns NULL and no drivers are listed.
I use Mandrake 9.2 and installed all RPMs found for the keyword ODBC. And InitDatabase doesn't return any errors, so I am almost certain that odbc works on my system.
What could be the problem?
Thx in advance, merendo
Re: No ODBC Drivers available?
Posted: Wed Sep 08, 2004 10:01 pm
by olejr
merendo wrote:
And InitDatabase doesn't return any errors
What's the return value then? If it's 0 then ODBC is
not available or too old..
[EDIT]
I'm running Mandrake 10, and on my machine pbcompiler
throws an:
/usr/bin/ld: cannot find -lodbc 
Posted: Thu Sep 09, 2004 11:43 am
by merendo
I am not certain what it does return but I am certain that it doesn't return 0.
I also got that error but then I took RpmDrake and installed any packages I found for the keyword 'odbc' and then it worked.
Posted: Thu Sep 09, 2004 11:50 am
by olejr
My error messages are gone! And it works..
Did the same thing you did installed everything 'odbc'..
Don't know but maybe you need the odbc connector from
mysql.com.. If you're using mysql that is...
Because all drivers listed on my system is from that package..
Posted: Fri Sep 10, 2004 7:39 pm
by merendo
Hmm.... And where exactly do I get that connector? Searched mysql.com but didn't find something...
Posted: Fri Sep 10, 2004 9:02 pm
by olejr
Posted: Sat Sep 11, 2004 9:06 am
by merendo
Hmm... downloaded and installed the MyODBC-3.51.09-1.i586.rpm but PB still doesn't find any odbc drivers...
There still something gotta be wrong.
Posted: Sat Sep 11, 2004 10:35 am
by olejr
the ODBC from mysql does not configure itself!
You have to do that 'by hand'!!
Code: Select all
Edit /usr/share/doc/packages/MyODBC/odbc.ini (the *.so files are in /usr/lib)
Copy odbc.ini to /etc
Add this to /etc/profile:
ODBCINI="/etc/odbc.ini"
ODBCSYSINI="/etc/odbc.ini"
export ODBCINI ODBCSYSINI
Here's the FAQ:
http://dev.mysql.com/doc/connector/odbc/en/faq_toc.html
This did it for me anyway...