aspose file tools*
The moose likes JDBC and the fly likes adding to a database using a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "adding to a database using a servlet" Watch "adding to a database using a servlet" New topic
Author

adding to a database using a servlet

J Derzaph
Greenhorn

Joined: May 29, 2008
Posts: 7
I don't know if this is the right place to this question but I couldn't find a mysql forum. So, here goes...
I have a servlet that connects to a database. It connects just find, can search and return results but I can't get it to add a record. It doesn't throw any exceptions, it looks like its adding the record but when I check the database it isn't there.
I'm probably missing something really obvious but I'm stumped. Anyone have any ideas?
prash patil
Ranch Hand

Joined: May 26, 2008
Posts: 40
Hi J Derzaph ,
Can you add your servlet code? so it will be easy to look your problem..

regards,
PP
sudhir nim
Ranch Hand

Joined: Aug 29, 2007
Posts: 212

Probably its the bug in your jdbc code.


[Servlet tutorial] [Servlet 3.0 Cook Book]
Yashpal Rawat
Greenhorn

Joined: Jun 19, 2008
Posts: 4
Please ensure you are doing database commit in your servlet code.
Shrikant Kesarkar
Greenhorn

Joined: Feb 08, 2008
Posts: 4
might be mysql database engine problem i.e. the code you are using
for saving object is not in accordance with mysql engine which is in use.
Try changing from innodb to myisam or vice versa.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"Yashu23",
Please check your private messages regarding an important administrative matter.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: adding to a database using a servlet