No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
[CODE] <%@ page language="java" import="java.sql.*" errorPage="" %> <% Connection conn = null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); conn = DriverManager.getConnection("jdbc:odbc:mydsn","a", "a"); PreparedStatement psInsertRecord=null; String sqlInsertRecord=null; String dt=request.getParameter("datum1"); String Name=request.getParameter("Name"); try { sqlInsertRecord="insert into ATT (Date, Name) values(?,?)"; psInsertRecord=conn.prepareStatement(sqlInsertRecord); psInsertRecord.setString(1,dt); psInsertRecord.setString(2,Name); psInsertRecord.executeUpdate(); } catch(Exception e) { out.println("Unable to connect to the database"); } try{ if(psInsertRecord!=null) … | |
[CODE] <%@ page language="java" import="java.sql.*" errorPage="" %> <% Connection con = null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); Connection conn = DriverManager.getConnection("jdbc:odbc:mydsn","a", "a"); PreparedStatement psSelectRecord=null; ResultSet rsSelectRecord=null; Statement st=null; String sqlSelectRecord=null; String Name=null; String id=null; String doj=null; String address=null; String contact=null; String dob=null; String blood=null; String gender=null; String pan=null; String martial=null; String email=null; String f1=null; … |