Hi,
I was a beginner in java.I was trying to connect to database(oracle) with the deatails
user:scott pass:tiger host string: PC0128166 with code as
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
connection =DriverManager.getConnection("jdbc:odbc:abhi","scott","tiger");
But i was getting the error as
Exception is ;java.sql.SQLException: [Microsoft][ODBC driver for Oracle][Oracle]ORA-12560: TNS:protocol adapter error
problem is the same error i was getting when i was logging into oracle from oracle console uname:scott
pass:tiger and host string as empty.
so i want to know how to connect to database using host string in jdbc connection