473,508 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JSP code to insert date in oracle

1 New Member
I have written jsp code to insert date in oracle
but its giving error null.my code is:


Expand|Select|Wrap|Line Numbers
  1. String query="insert into test_KMS_DATA_ROW values('"+rocode+"','"+roname+"',"+activityId+",'"+activity+"',"+duration+",to_date("+startdate+",MM/DD/YYYY HH24:MI:SS),'"+starttime+"',to_date("+enddate+",MM/DD/YYYY HH24:MI:SS),'"+endtime+"','"+startby+"','"+endby+"','"+d+"','N')";
  2.  
  3. stmt1=con.createStatement();
  4. int n=stmt1.executeUpdate(query);
  5.  

please help me on this....
thanx in advance...
Mar 6 '11 #1
0 1940

Sign in to post your reply or Sign up for a free account.

Similar topics

18
10248
by: Robin Lawrie | last post by:
Hi again, another problem! I've moved from an Access database to SQL server and am now having trouble inserting dates and times into seperate fields. I'm using ASP and the code below to get the...
7
2422
by: Arek | last post by:
Hey, I am inserting values in the table: Dim sqlcomm1 As SqlCommand = New SqlCommand("INSERT INTO tblTasks (idTask, outdate) VALUES ('" & IDTask.text & "','" & txtOutdate.Text & "')", conn)...
1
10382
by: SSG | last post by:
How to insert date to the sql server database. I am getting input from the HTML form and store it to database using ASP. how to store date field, what datatype needed and what conversion...
3
9583
by: kiask2343 | last post by:
Ok I need a little help here. I need the code to insert todays date into a specific field. This is what I think I need but I don't know how to make it work. INSERT INTO target ])] VALUES...
1
8026
by: nihilks | last post by:
i use ADO in VB6 to connect to my Oracle database i made aconnection object 'con' and opened the database using it when i executed the statement con.Execute "insert into employee(no,,join_date)...
0
1604
by: sourabhmca | last post by:
hi friend, I am want to insert date with time into sql server2000 using JSP.I hv 3 combo box for dd mm yyyy and 2 text box for hh and min ? and my table field type is smalldatetime.after that i ...
1
2126
by: yzlin04 | last post by:
Does anyone know how to insert date into vb.net datagrid by using INSERT INTO command? From the code below, the error message is in cmd.ExecuteNonQuery() line. Here is the error message: An...
0
1401
by: raoofahmedkhan | last post by:
Hi All, I am trying to develop an application in vb.net in which i need to insert date in oracle database, my application is in vb.net. i am getting some problem while inserting date. Does...
5
5095
by: zensunni | last post by:
I like to use this method when inserting into a database: Set Insert = Server.CreateObject("ADODB.Recordset") Insert.Open "test", objConn, 1, 3, 2 Insert.AddNew Insert("FIRSTNAME") = "Joe"...
2
2020
by: ankitjain100 | last post by:
Hello Guys, This is my first question on this platform. I want to ask that How to insert Date in MY SQL in the MM-DD-YY format i am using JSP as my frontend. Please tell me , i will be very...
0
7328
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5631
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5055
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4709
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3199
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3186
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1561
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
422
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.