Im trying to access the databsae values & displaying it on the screen..my database connections r alright & evn the db is also rite..but its not displayin anything on the screen..can u help me??
<html>
<head><Title> login details </title><head>
<%@page language="java" import="java.io.*,java.sql.*" %>
<body>
<%
String name="";
String pass="";
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:Odbc:mydsn");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from notice");
while(rs.next())
{
name=rs.getString(1);
out.write(name);
pass=rs.getString(2);
out.write(pass);
}
}catch(Exception e){System.out.println(e); }
System.out.println("name");
// out.write();
out.write(pass);
%>
</body>
</html>