total time calculator (starttime+endtime) in servlet USING DATABASE IN SQL2000 PLZ ANY ONE HELPME

Ads

 
 

Share on Google+Share on Google+

chinnadurai
total time calculator (starttime+endtime) in servlet USING DATABASE IN SQL2000 PLZ ANY ONE HELPME
0 Answer(s)      4 years and a month ago
Posted in : JSP-Servlet
 <%-- 
    Document   : insertdate
    Created on : Jul 19, 2013, 3:48:28 PM
    Author     : CG0T4908
--%>

<[email protected] contentType="text/html" pageEncoding="UTF-8"%>
<[email protected] 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>
Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
total time calculator (starttime+endtime) in servlet USING DATABASE IN SQL2000 PLZ ANY ONE HELPME
total time calculator (starttime+endtime) in servlet USING DATABASE IN SQL2000 PLZ ANY ONE HELPME   <%-- Document : insertdate... =request.getParameter("Endtime"); //System.out.println("Reqqq"+Starttime);// Connection con
plz help me any one as fast as u can
plz 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
can any one give the frogort password code using jsp,
can any one give the frogort password code using jsp,  plz give the code for frogot password
Calculator - JSP-Servlet
Calculator  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
have any one tried ajaxanywhere with jsp/servlet please provide sample
have any one tried ajaxanywhere with jsp/servlet please provide sample  hello you can find this app here: http://ajaxanywhere.sourceforge.net it explains how to use this with struts but not with simple jsp servlet(or i am
update database using two queries at a time
update 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 retrive database information using servlet and disply in table format in browser
How to retrive database information using servlet and disply in table format in browser  Hi, any one send code how to retrive the data base information in table format in web browser
calculate total hours by start time and end time in javascript - Ajax
well. i want to display total hours by using start and end timepicker. pls clarify my doubts. how to calculate total hours by using start and end time field...calculate total hours by start time and end time in javascript  hi, i
retrive the employee details with image from mysql database using jsp servlet
stored in the database using jsp servlet then want to show the result in the next jsp page. any one help me out...retrive the employee details with image from mysql database using jsp
how to write the coding for converting the database data for example population into any type of graph using jsp and servlets?//
the database data for example population into any type of graph using jsp and servlet...coding for converting the database data  how to write the coding for converting the database data for example population into any type of graph using
edit database using jsp and servlet
edit 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
How to delete the row from the Database by using servlet
: Delete row from database using servlet   In that link solution...How to delete the row from the Database by using servlet  Dear Sir/Madam I am trying to delete the one user data in the Oracle SQL server database
Create a web application using any technology to display 10 most relevant tweets from Twitter in real-time for the keyword
Create a web application using any technology to display 10 most relevant tweets from Twitter in real-time for the keyword   Create a web application using any technology to display 10 most relevant tweets from Twitter in real
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
Retrieve image from database using servlet and display in JSP
Retrieve image from database using servlet and display in JSP  Hi, I am total new to JSP although I am learning it for the last few days. Now I want to use MySQL Database from JSP page. How to retrieve image from database using
web application using any technology to display 10 most relevant tweets from Twitter in real-time
web application using any technology to display 10 most relevant tweets from Twitter in real-time  web application using any technology to display 10 most relevant tweets from Twitter in real-time
how to display a table from database using servlet
how to display a table from database using servlet  how to display... the following link: http://roseindia.net/jsp/servlet-jsp-data-list.shtml Thanks...://roseindia.net/jsp/servlet-jsp-data-list.shtml Thanks
Insert Image into Database Using Servlet
Insert  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
how to connect the database using hibernet through servlet/jsp through form
how to connect the database using hibernet through servlet/jsp through form  plz give me the reply   Hi Friend, Please visit the following link: http://www.roseindia.net/jsf/myfacesspring/loginRegistration.shtml Hope
can any one explain this
can 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
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
How to store multiple images in folder and images path in database at a time using jsp?
How to store multiple images in folder and images path in database at a time using jsp?  I wanna browse multiple images in one form and store them in one folder and their path into datrabase
Upload Excel into Database Table Using SERVLET - JSP-Servlet
Upload Excel into Database Table Using SERVLET  Hi i hava sitution that upload .xls file into database table which has same coloumn names... in database table are NAME,ID,SAL. please help me to upload that excel using
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
Calculator
Calculator  need a simple java program to degin a CALCULATOR without using ADVANCED JAVA....   Calculator in Java Swing
How to get the data from the database using Servlet or JSP program
How to get the data from the database using Servlet or JSP program  ... the problem   Get data from database using servlet Retrieve data from... by using servlet or jsp program by typing the output as like this below
How to display image in jsp from database using Servlet?
How to display image in jsp from database using Servlet?  Hi, How to display image in jsp from database using Servlet? Thanks   Hi, You will find code and example program at Retrieve image from database using Servlet
HTML code to servlet to database using jdbc
HTML code to servlet to database using jdbc  pls send me the code related to the title   Hi Friend, Try the following code: 1)form.html: <html> <form method="post" action="http://localhost:8080/examples/Data
How to browse excel file and stored the contents into the database using jsp/servlet?
How to browse excel file and stored the contents into the database using jsp/servlet?  Hi.. I want to browse excel file and stored the file data into the My-sql database using jsp/servlet
Upadate Database using updatable fields - JSP-Servlet
Upadate 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