Dear All,
I hope that this is the right forum.
My apologies if it is not.
Can anyone tell me what I am doing wrong with my database connection.
First some history:-
On RedHat 9.0 I have added the packages for:-
Mysql
unixODBC
myODBC
I tested that mysql was running
I have modified the ini files
odbcinst.ini
[MySQL]
Description = ODBC for MySQL
Driver =/usr/libg/libmyodbc.so
FileUsage =1
odbc.ini
[Mic]
Description =MySQL database test
Driver =MySQL
Server =localhost
Database =test
Port =3306
I then tested using :-
isql Mic
and it was OK.
Then when I tried to run a java program to test the connection, It failed on the line
Connection con = DriverManager.getConnection("jdbc
dbc:Mic");
throwing a NullPointerException.
Does anyone have any idea what is the problem ?
Or can someone point me to a location where I can find out how to create Data Source Names in Linux, test and connect to them.
Thank you in advance.
#
###
#####
#######
Ziggurat
I hope that this is the right forum.
My apologies if it is not.
Can anyone tell me what I am doing wrong with my database connection.
First some history:-
On RedHat 9.0 I have added the packages for:-
Mysql
unixODBC
myODBC
I tested that mysql was running
I have modified the ini files
odbcinst.ini
[MySQL]
Description = ODBC for MySQL
Driver =/usr/libg/libmyodbc.so
FileUsage =1
odbc.ini
[Mic]
Description =MySQL database test
Driver =MySQL
Server =localhost
Database =test
Port =3306
I then tested using :-
isql Mic
and it was OK.
Then when I tried to run a java program to test the connection, It failed on the line
Connection con = DriverManager.getConnection("jdbc
throwing a NullPointerException.
Does anyone have any idea what is the problem ?
Or can someone point me to a location where I can find out how to create Data Source Names in Linux, test and connect to them.
Thank you in advance.
#
###
#####
#######
Ziggurat