I'm Using Oracle 11g database. When i try to access data from db it was showing the error java.sql.SQLException: ORA-03115: unsupported network datatype or representation. I'm not understanding what this error means..
my code is :
String uname,pass;
ResultSet rs = null;
response.setContentType("text/html");
PrintWriter out=response.getWriter();
try
{
uname=request.getParameter("uname");
pass=request.getParameter("pass");
Connection con=prepareConnection();
String Query="select uname from passmanager where pass=?";
PreparedStatement ps=con.prepareStatement(Query);
ps.setString(1,pass);
rs=ps.executeQuery(Query);
if (rs.next() && uname.equalsIgnoreCase(rs.getString("uname")) || uname.equalsIgnoreCase(rs.getString("email"))) {
HttpSession session = request.getSession(true);
session.setAttribute("uname", rs.getString(1));
ServletContext context = getServletContext();
RequestDispatcher dispatcher = context
.getRequestDispatcher("/profile");
dispatcher.forward(request, response);
}
Any one help me to solve this problem..
Instead of:
rs = ps.executeQuery(Query);
you should execute:
rs = ps.executeQuery();
Otherwise, you unprepare your statement and lose all parameters because you assign it a new SQL statement (even though it's the same).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With