total time calculator (starttime+endtime) in servlet USING DATABASE IN SQL2000 PLZ ANY ONE HELPME
<%--
Document : insertdate
Created on : Jul 19, 2013, 3:48:28 PM
Author : CG0T4908
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body bgcolor="#4eeerwty">
<%
String Empname=request.getParameter("empname");
String Empid=request.getParameter("empid");
String projectname=request.getParameter("projectname");
String Requirementid=request.getParameter("RequirementID");
String taskid=request.getParameter("taskid");
String category=request.getParameter("category");
String Datet=request.getParameter("Date");
String Starttime=request.getParameter("starttime");
String Min=request.getParameter("minutes");
String ampms=request.getParameter("ampms");
String Endtime=request.getParameter("Endtime");
String Endmin=request.getParameter("endtimeminutes");
String Endampm=request.getParameter("endtimeampm");
String TaskDescription =request.getParameter("comments");
String tottime =request.getParameter("Endtime");
//System.out.println("Reqqq"+Starttime);//
Connection con;
Statement st;
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
try
{
//int Dated =Integer.parseInt("Date");
// char Dater=Character.parseChar("Date");
con=DriverManager.getConnection("jdbc:microsoft:sqlserver://10.32.4.27:1433;DatabaseName=chinna;User=sa;Password=sa");
st=con.createStatement();
int f=st.executeUpdate("insert into inserttable(projectname,RequirementID,taskid,category,datet,Starttime,Endtime,TaskDescription,TotalTime,EmployeeID)values('"+projectname+"','"+Requirementid+"','"+taskid+"','"+category+"','"+Datet+"','"+Starttime+"/"+Min+"/"+ampms+"','"+Endtime+"/"+Endmin+"/"+Endampm+"','"+TaskDescription+"','"+tottime+"','"+Empid+"')");
if(f==1)
{
out.println("Data Saved");
}
else
{
out.println("Failed");
}
}
catch(Exception e)
{
out.println("error"+e.getMessage());
}
%>
</body>
</html>
View Answers
Related Tutorials/Questions & Answers:
plz help me any one as fast as u canplz help me
any one as fast as u can A thief Muthhooswamy planned... is given in an array. Write a program to find out the
total number of jumps he... return
total number of jumps to the output variable output1 provided
Examples
Advertisements
Calculator - JSP-ServletCalculator Dear Deepak Sir,
Calculator program is avilable in Jsp/
Servlet plz send me.
Thanks & Regards,
VijayaBabu.M Hi vijay
calculator program in jsp
function checkValue(){
var msg
edit database using jsp and servletedit
database using jsp and servlet I am creating a website
using jsp and servlets that is used to view houses from a
database. I want to be able... information from the
database in the textboxes. Please help me to display
update database using two queries at a timeupdate
database using two queries at a time String sql="insert into employee values(emp_seq.nextval,\'"+ename+"\',\'"+eadd+"\',\'"+ephone... to perform insertion in both the tables i.e employee and appusers at the same
time how to display a table from database using servlethow to display a table from
database using servlet how to display... the following link:ADS_TO_REPLACE_1
http://roseindia.net/jsp/
servlet-jsp-data... the following link:
http://roseindia.net/jsp/
servlet-jsp-data-list.shtml
ThanksADS
Insert Image into Database Using ServletInsert Image into
Database Using Servlet
... image into
database table
using
Servlet. This type of program is useful in social... the image from
database using
Servlet. After retrieving the image from
database Insert Image into Database Using Servlet Insert Image into
Database Using Servlet
... of inserting image into
database table
using
Servlet. This type of program is useful... to retrieve the image from
database using
Servlet. After retrieving the image from
HTML code to servlet to database using jdbcHTML code to
servlet to
database using jdbc pls send me the code related to the title
Hi Friend,
Try the following code:ADS_TO_REPLACE_1
1)form.html:
<html>
<form method="post" action="http://localhost
Upadate Database using updatable fields - JSP-ServletUpadate
Database using updatable fields Hi,
Thanks for previous... is pulled from
database and displayed
in the updatable fields.Means after user submits, the
database table should get updated with these new entries he has made
Image upload in mysql database using jsp servletImage upload in mysql
database using jsp servlet Hello, I need code to insert image in mysql
database, I have seen the code which is already in your portal but it is not inserting image into
database it save in the folder
fetch record from oracle database using jsp-servlet?fetch record from oracle
database using jsp-
servlet? how can i fetch data from oracle
database by
using jsp-
servlet. i'm
using eclipse, tomcat server and oracle
database and creating jsp pages and also
using servlet can any one explain thiscan
any one explain this class Clidder {
private final void flipper() {
System.out.println("Clidder");
}
}
public class Ex3 extends Clidder {
public final void flipper() {
System.out.println
Java example to calculate the execution time will describe you the way that how
one can calculate or get the execution
time... program we are
using System.currentTimeMillis()
method for getting current
time... we have stored the current
time in a variable
startTime and
after the method
Plz Plz reply Me - JSP-ServletPlz Plz reply Me Respected Sir/madam,
I am R.Ragavendran.. Actually I got your coding.. But This code is not enabling the user to click and change...
using radio buttons..
You have used the following syntax for checking whether
What is Hibernate one to one relation?Any example..What is Hibernate
one to
one relation?
Any example.. Hello,
What is Hibernate
one to
one relation? Is there
any example of it..
Thanks..
Dear Friend,
Here are detailed tutorials and examples of Hibernate
One-to-
one plz help me!!!!!!!! - JSP-Servletplz help me!!!!!!!! i`ve set the environment varaibles for tomcat as well as jdk.. but i`m not understanding where i`ve to save my
servlet..i.e.... there are compilation errors..
plz do help me. make sure that you did
Graphical calculator using AWT - Java BeginnersGraphical
calculator using AWT hi Sir,
I need a source code for the following prgm...pls help me..
Implement a simple graphical
calculator using AWT.The
calculator shd perform simple operation like addition, subtraction
Graphical calculator using AWT - Java BeginnersGraphical
calculator using AWT Hi Sir,
Thanks for the reply... But i got some errors while compiling some of them i made clear but still
one error.....and is it the same code we need implement on Graphical Calc
using Swing?
Here is the prg code
prog. using radio buttons for simple calculatorprog.
using radio buttons for simple calculator import java.awt....*;
class
Calculator extends JFrame {
private final Font BIGGER_FONT = new Font... = new CalculatorOp();
public
Calculator() {
textfield = new JTextField("0