Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Database Connection in JSP

843859Sep 11 2006 — edited Sep 12 2006
HI
Class.forName ("sun.jdbc.odbc.jdbcodbcdriver");
String sql = "SELECT * " +"FROM Users";
Connection con=DriverManager.getConnection "jdbc:odbc:Memory");
<b>(Memory is my MSAcess Datbase Name )</b>
Statement s =con.createStatement();
ResultSet rs = s.executeQuery(sql);
while (rs.next());
out.print(rs.getString(1));

I use this code in Jsp page with some html coding. When i call the jsp page using tomcat i am unable to retrive data from the database. the page is displaying html content properly but no database retrival and no errors in the page

Can any one help me

Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 10 2006
Added on Sep 11 2006
6 comments
205 views