PDA

View Full Version : java for mac




ashokformac
Mar 27, 2007, 02:09 AM
Hi , i am new to mac. i am using java jdbc connection to access the data in ms sql server.I am using jTDS jdbc driver and mac 10.4 . I am not able to connect to sql server .
following are the lines i used for connection ..

Class.forName("net.sourceforge.jtds.jdbc.Driver");
Connection connection = DriverManager.getConnection("jdbc:jtds:sqlserver://172.16.4.59/iarchivev2;user=iarchiveuser;password=system");

but connection was not establishing...
it say unable to connect to remote host..

can any one help me to solve this problem...



takao
Mar 27, 2007, 05:19 AM
well what is the error message you got ?

ashokformac
Mar 27, 2007, 05:46 AM
This is the error message i got after exactly 70 seconds

" Network error IOException: Operation timed out "

Lyle
Mar 27, 2007, 02:14 PM
Can you connect to that database server (at that IP address, and using that user name and password) using any other client? That is, have you at least confirmed that the problem is in your Java code and not some more general connectivity problem that has nothing to do with your code?

It would help to get some more information about what steps you have taken to try to diagnose the problem.