Originally posted by Albert Lee: who can tell me how to connect oracle with JDBC in JSP.I use these codes: Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con=DriverManager.getConnection( "jdbc:oracle:thin:@220.127.116.11:1521:mainora","ni","iu"); Statement sta=con.createStatement(); ResultSet rs=sta.executeQuery(seclect * from nill); I use a thin client.but there is no result in the jsppage.why?Thanks in advance
You don't really have a table named "nill" do you? That would be my first guess as to your problem-- make sure the table you use in the select statement is a valid table. Then ensure your SQL is correct ("seclect" was a typo, right?). Then after you get the ResultSet, you need to page through it and read the data. You appear to be just beginning JDBC. You may want to search for some tutorials before continuing. Here's one: http://java.sun.com/docs/books/tutorial/jdbc/ [ November 20, 2002: Message edited by: Kevin Mukhar ]
Joined: Aug 04, 2002
it always throw exception when the programe load driver.i don't know why?is that mean i should config my client?
Joined: Nov 28, 2000
Originally posted by Albert Lee: it always throw exception when the programe load driver.i don't know why?is that mean i should config my client?