-
-
-
-
Connection c=DriverManager.getConnection("jdbc:oracle:thin:@hostname:1521:sid","scott","tiger" );
Statement s=c.createStatement();
ResultSet rs=s.executeQuery("select * from books");
while(rs.next())
{System.out.println("dno="+rs.getString(1)+"t"+"dname="+rs.getString(2)+"t"+"loc="+rs.getString(3));
}
}catch(Exception e){System.out.println(e);}
}
}">Problem in connection with Oracle without ODBC using Think DriverFollowing code is not workinggiving error Exception in thread Main java.lang.NoClassDefFoundError:jdbc1import java.sql.*;class jdbc1 { public static void main(String args[]) { try{ Class.forName("oracle.jdbc.driver.OracleDriver"); Connection c=DriverManager.getConnection("jdbc:oracle:thin:@hostname:1521:sid","scott","tiger" ); Statement s=c.createStatement(); ResultSet rs=s.executeQuery("select * from books"); while(rs.next()) {System.out.println("dno="+rs.getString(1)+"t"+"dname="+rs.getString(2)+"t"+"loc="+rs.getString(3)); } }catch(Exception e){System.out.println(e);} } }
-
-
-
-
-
-
-
-
What is magic word in java? and How to find it?
ca fe ba besteps:when u open any .class file.u can see first 4 characters.u have read those characters from the class file and convert those characters into Hexadecimal using toHexString method in Integer wrapper class.
-
-
-
-
JNDI -Java Naming and Directory Interface
What is the need of JNDI(Java Naming and Directory Interface) ? Explain with real-time usage ?
-
-
-
-
J2EE Interview Questions
Sub Category
Questions
Answers
Last Updated
Ans