• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Atten : Mr. Yogen Vadnere

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur help.
The following is my code.

<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>

<% String ssn1 = request.getParameter("txtSsn") ;<br /> String lastname = request.getParameter("txtLastname");<br /> String firstname=request.getParameter("txtFirstName");<br /> String email=request.getParameter("txtEmail");<br /> String gender=request.getParameter("cboGender");<br /> String degree=request.getParameter("cboDegree");<br /> String major1=request.getParameter("cboMajor1");<br /> String major2=request.getParameter("cboMajor2");<br /> String graduationdate=request.getParameter("txtGraduationDate");<br /> String authorization=request.getParameter("cboAuthorization");<br /> String jobtype=request.getParameter("cboJobType");<br /> String gpa1=request.getParameter("txtGpa");<br /> String skill=request.getParameter("txtSkills");<br /> int ssn;<br /> double gpa;<br /> String driver = "sun.jdbc.odbc.JdbcOdbcDriver";<br /> String url = "jdbc dbc:Resume"; <br /> <br /> ssn=Integer.parseInt(ssn1);<br /> gpa=Double.parseDouble(gpa1);<br /> Class.forName(driver);<br /> Connection con=null;<br /> try{<br /> con=DriverManager.getConnection(url);<br /> /*String sql=*/<br /> Statement stmt=con.createStatement();<br /> stmt.executeUpdate("insert into Profile values(ssn,'lastname','firstname','email','gender','degree','major1','major2','graduationdate','authorization','jobtype',gpa,'skill')"); <br /> stmt.close();<br /> stmt=null;<br /> }<br /> finally{<br /> if(con!=null){<br /> con.close();}<br /> }<br /> %>

 
Yogen Vadnere
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is ur code ???
 
vikram nalagampalli
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Yogen Vadnere:
Where is ur code ???

my code
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>

<% String ssn1 = request.getParameter("txtSsn") ;<br /> String lastname = request.getParameter("txtLastname");<br /> String firstname=request.getParameter("txtFirstName");<br /> String email=request.getParameter("txtEmail");<br /> String gender=request.getParameter("cboGender");<br /> String degree=request.getParameter("cboDegree");<br /> String major1=request.getParameter("cboMajor1");<br /> String major2=request.getParameter("cboMajor2");<br /> String graduationdate=request.getParameter("txtGraduationDate");<br /> String authorization=request.getParameter("cboAuthorization");<br /> String jobtype=request.getParameter("cboJobType");<br /> String gpa1=request.getParameter("txtGpa");<br /> String skill=request.getParameter("txtSkills");<br /> int ssn;<br /> double gpa;<br /> String driver = "sun.jdbc.odbc.JdbcOdbcDriver";<br /> String url = "jdbc dbc:Resume"; <br /> <br /> ssn=Integer.parseInt(ssn1);<br /> gpa=Double.parseDouble(gpa1);<br /> Class.forName(driver);<br /> Connection con=null;<br /> try{<br /> con=DriverManager.getConnection(url);<br /> /*String sql=*/<br /> Statement stmt=con.createStatement();<br /> stmt.executeUpdate("insert into Profile values(ssn,'lastname','firstname','email','gender','degree','major1','major2','graduationdate','authorization','jobtype',gpa,'skill')"); <br /> stmt.close();<br /> stmt=null;<br /> }<br /> finally{<br /> if(con!=null){<br /> con.close();}<br /> }<br /> %>

 
vikram nalagampalli
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cAN U PLS CLICK THE REPLY/WQUOTE LINK. i DONT KNOW WHY MY CODE IS NOT SHOWING UP OUT THERE.
THANKS
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic