Autocommit problem

Поиск
Список
Период
Сортировка
От mp.rajkhowa
Тема Autocommit problem
Дата
Msg-id 28d149eed22d122.4784b652@nic.in
обсуждение исходный текст
Список pgsql-jdbc

hello

i am developing an application using tomcat 5.5.6 and postgrsql7.3 (pg73jdbc3.jar) deployed inRedHat linux.  Three days earlier updated acolumn of particular row in a table . When i retrieved thesame row from the JSP page it was showing OK.Even when i run theselect statement for the row in postgresql console it wasshowing updated value. But today that means after 3 days when i try to view the row  it  is showing the  old valueforthe row.  When i run the select statement for the row inposgresql console it is showing the old value. How can it happen?Can you please help me out. My java code for the updation isshown below.....
 
        String sql = "UPDATE ........";
      Connection con =DBConnection.getConnection(); // DBConnectio is aclass for getting theconnection
        Statement stmt = con.createStatement();
        // Update a row
        try {
             con.setAutoCommit(false);
             int rowsUpdated = stmt.executeUpdate(sql);
             if (rowsUpdated != 1) {
               System.out.println("Success");
            }
           con.commit();
        }
        finally {
            stmt.close();
        }


with regards
Mridu Pobon Rajkhowa

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Håkan Jacobsson
Дата:
Сообщение: Re: JBoss-related question
Следующее
От: Moien
Дата:
Сообщение: How to Install PostgerSQL_Driver ( in tomcat ) ?