My web-application consist of servlet and applet. Applet view some table from data base and user can edit and save her. Exactly, applet send query to servlet for getting data from data base. I use DataExpress components.
Getting data from data base. Applet send to the servlet data base's name, table's name, data base's URL, driver's name, login and password. Servlet use this data for making query, send him to the data base and return data to the applet. It's I done and this is working.
Saving data in data base. When user clicked "Save" button, applet send servlet object NewMetaDataDBConnection. NewMetaDataDBConnection has base's name, table's name, data base's URL, driver's name, login, password and, of course, data. I promise that this object has right data, but next code doesn't save in data base
I wrote database1.getJdbcConnection().rollback();/ database1.getJdbcConnection().commit();. And nothing. :-(. Maybe, I do something wrong but I don't understand what...
Hmm...
I took a look at your code... Do not be resentful but sometime it very terrible. Never write an empty catch block. If exception occurs how do you understand that?
So try to debug carefully:
1. Do you create a valid SQL query.
2. Does it insert a non empty result into a DB.
3. Does the insert operation committed and flushed.
If all OK then the problem happens not with the DB operation but somewhere else.
Bookmarks