connectivity « JDBC « JSP-Servlet Q&A





1. JDBC connectivity problem through JSP    coderanch.com

2. Jsp databse connectivity problem    coderanch.com

Hi friends , I am new to jsp programming and i am actually stuck up at a small point of my jsp programe. I was actually doing a jsp prog that would connect to oracle databse and retrieve the data and show it back to the user. But when i execute it i get this error ------------------------------------------------------------------------------- ------------------------------------- javax.servlet.ServletException: Unable to ...

3. JDBC Connectivity in Servlets    coderanch.com

4. connectivity in jsp    coderanch.com

5. Regarding Servlet connectivity with ms-access    coderanch.com

import javax.servlet.http.*; import javax.servlet.*; import java.io.*; import java.sql.*; public class MyServlet extends HttpServlet { public void doPost(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException { PrintWriter out=res.getWriter(); res.setContentType("text/html"); String n1=req.getParameter("uname"); String n2=req.getParameter("uid"); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:hello"); PreparedStatement pstmt=con.prepareStatement("insert into myTable values(?,?)"); pstmt.executeUpdate(); con.close(); pstmt.close(); } catch(Exception e) { out.println("exception="+e); } } } the above code generates an exception: exception=java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data ...