Ronak Trivedi

Greenhorn
+ Follow
since Feb 23, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ronak Trivedi

when i entering the empid uname and salary it cant go to the salary page it would be refresh the page sir please help me a boutthis code i want to display


hello sir here this is the code for inputing salary and output display the payment slip but it give me error 500
first i am running administrator form


this is the administrator form i am inputing value and click on show button it cant show the slip please help me sir

[Added code tags - see UseCodeTags for details]
Hello sir i am trying to code for display salary slip this code is use for inputing eid adn display salary slip but i have no idea what i will do
<%--
Document : Salary
Created on : Mar 24, 2012, 11:27:02 PM
Author : Rushi
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Salary Result</title>
</head>
<body>
<%@ page import="java.sql.*" language="java" %>
<%@ page import="java.io.*"%>
<%
try
{

String eid=null,uname;
String salary,hra,da,pf,gross,net,sal;
String eid2=request.getParameter("eid");
String uname1=request.getParameter("uname");
String salary1=request.getParameter("salary");

Connection con = null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:Employee","system","tiger");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from EMPLOYEE where eid="+eid2+"");
if(rs.next()){
%>
<table border="1" align="center">
<tr><td>EID</td><td><input type="text" value="<%=rs.getString("eid")%>"> </td></tr>
<tr><td>Uname</td><td><input type="text" value="<%=rs.getString("uname")%>"> </td></tr>
<%
if(?)

{

}

{

}




%>
</body>
</html>
after inputing eid show ename
and calculation of hra da pf gross nsal
suddenly blank please help me sir.
and saving another table
Thank you
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: javax.servlet.ServletException: java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00947: not enough values
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:534)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:442)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)


root cause

javax.servlet.ServletException: java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00947: not enough values
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:911)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:840)
org.apache.jsp.registered_jsp._jspService(registered_jsp.java:133)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)


root cause

java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00947: not enough values
sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6956)
sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7113)
sun.jdbc.odbc.JdbcOdbc.SQLExecute(JdbcOdbc.java:3148)
sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(JdbcOdbcPreparedStatement.java:215)
sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(JdbcOdbcPreparedStatement.java:137)
org.apache.jsp.registered_jsp._jspService(registered_jsp.java:123)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)


note The full stack trace of the root cause is available in the Apache Tomcat/7.0.11 logs.


--------------------------------------------------------------------------------

Apache Tomcat/7.0.11







Hello Sir this type of Error coming my project code is

<%--
Document : registered
Created on : Mar 20, 2006, 6:44:55 PM
Author : Rushi
--%>
<%@page language="java" import="java.sql.*" contentType="text/html" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Registration Confirmation</title>
</head>
<body>
<%
String eid = request.getParameter("eid");
String fname = request.getParameter("fname");
String mname = request.getParameter("mname");
String lname = request.getParameter("lname");
String gender = request.getParameter("gender");
String email = request.getParameter("email");
String process = request.getParameter("process");
String designation = request.getParameter("designation");
String dob = request.getParameter("dob");
String cadd = request.getParameter("cadd");
String ccity = request.getParameter("ccity");
String cstate = request.getParameter("cstate");
String ccountry = request.getParameter("ccountry");
String czip = request.getParameter("czip");
String padd = request.getParameter("padd");
String pcity = request.getParameter("pcity");
String pstate = request.getParameter("pstate");
String pcountry = request.getParameter("pcountry");
String pzip = request.getParameter("pzip");
String bname = request.getParameter("bname");
String brname = request.getParameter("brname");
String accno = request.getParameter("accno");
String pcno = request.getParameter("pcno");
String uname = request.getParameter("uname");
String pwd = request.getParameter("pwd");
String cpwd = request.getParameter("cpwd");
String acctype = request.getParameter("acctype");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection cn = DriverManager.getConnection("jdbc:odbc:Employee","system","tiger");
PreparedStatement s = cn.prepareStatement("insert into EMPLOYEE values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
s.setString(1,eid);
s.setString(2,fname);
s.setString(3,mname);
s.setString(4,lname);
s.setString(5,gender);
s.setString(6,email);
s.setString(7,process);
s.setString(8,designation);
s.setString(9,dob);
s.setString(10,cadd);
s.setString(11,ccity);
s.setString(12,cstate);
s.setString(13,ccountry);
s.setString(14,czip);
s.setString(15,padd);
s.setString(16,pcity);
s.setString(17,pstate);
s.setString(18,pcountry);
s.setString(19,pzip);
s.setString(20,bname);
s.setString(21,brname);
s.setString(22,accno);
s.setString(23,pcno);
s.setString(24,uname);
s.setString(25,pwd);
s.setString(26,cpwd);
s.setString(27,acctype);
s.executeUpdate();%>
<h1 align ="center"><u>Thank You For Registration!</u></h1>
</body>
</html>
hello sir i am using this code for simple program to save the record and i am using Oracle 11g

Sir where i am underline there come error i think driver connection problem but i am using oracle11g in when i am create dsn that name is found and i am connect oradb11g_home1
but sir they never connect.


So sir please help me about this Error which name i will give there where i am underline
hello sir
I am Roank i am using windows 7 64bit in that i want to use database option for servlet program to run and save the database can you tell me what is the process of using oracle 8i or 10g or 11g how we save record
because here i am trying there is no get connection and not saving record