wood burning stoves 2.0*
The moose likes Java in General and the fly likes Please a help in preparedStatement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Please a help in preparedStatement " Watch "Please a help in preparedStatement " New topic
Author

Please a help in preparedStatement

abcddd efghdd
Greenhorn

Joined: Jan 25, 2013
Posts: 2
Hey all!
The first thank you for your attenion!
well,im trying to make a managment application in java using Oracle database but i met a problem

when i click on Add button i want to insert into a "client table" and the sametime i want to insert into "serveur_client_chambre" table
but the problem is when i clicked on it , the second preparedStatement dosen't work ! i meant nothing done in "serveur_client_chambre" table ! i dont know why ...
HERE ARE A ADD BUTTON CODE THAT IM USING

Kamal
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2170
    
  47
Welcome to the Ranch.
Please UseCodeTags (← click) when posting code as it makes it easier for people to read your code. I've added them for you this time.

Your problem is because you aren't calling executeUpdate() on the second statement.
abcddd efghdd
Greenhorn

Joined: Jan 25, 2013
Posts: 2
Yes! thank you
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2170
    
  47
No problem.
 
Don't get me started about those stupid light bulbs.
 
subject: Please a help in preparedStatement
 
Similar Threads
refresh table doesn't work
retrieving data from table and saving into database
Solved : Java CheckBox to insert data
Database connectivity-Context.xml
Regarding Data Insertion