File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes data in table getting overridden? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "data in table getting overridden?" Watch "data in table getting overridden?" New topic
Author

data in table getting overridden?

venkatesh padmanabhan
Greenhorn

Joined: Feb 17, 2006
Posts: 20
I have a calendar program in jsp. The page submits to itself. Am performing 2 insertions in it,
(i) when the user selects a date, they can enter some description of the date and store it in database.
(ii) when the calendar page gets loaded, depending on the user selected year,all the saturdays and sundays of the year, get inserted into database.

The second insertion am able to do, but am having trouble with the first insertion. when i try to insert the data, its not getting inserted. And also,if the users select 2006 then saturdays and sundays of 2006 get in, next time when user selects 2007, only the saturdays and sundays of 2007 are only available in database..
I have used MYSQL as database. Holiday is the table name. Fields are HolidayDate which is primary key and is a date field
Description is varchar field
Weekender is char field
Program name : CalendarPage.jsp

This is the part of code, which is making the insertion of the first part.

Am able to print the list values, but those dates are not getting into database.Is there anything wrong in the query?
Please help??
[ March 30, 2006: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Moved to the JDBC forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: data in table getting overridden?
 
Similar Threads
SQLServerException - could not connect to the host on port 1433
database values to have different color in jsp program
year getting null?
data in table getting overridden?
database values to have different color in jsp program