2 Replies Latest reply on Dec 29, 2005 3:22 AM by Stefano Gallina

    More than 2000 statements into a a transaction ! How to mana

    Stefano Gallina Newbie

      Hi all,

      I have to read the content of a text file ( about 5000 lines ) for each of its line i have to run some SELECT queries and in a certain case an INSERT or UPDATE statement.
      Well, i open one connection , i open a WHILE cycle to read the file content and at the end of the WHILE i close the connection.
      Using a connection from a pool of Jboss ( i use DB2) with setAutoCommit set to TRUE everything works fine but the INSERT or UPDATE statements dont't go fine and i don't get any error.
      If i use a file with just 500 lines everything works fine.
      I dont' know how to explain this case.
      I tryed to get a connection directly e set the AUTOCOMMIT to false and before closing the connection call the COMMIT method but i still get the same problem.
      Is it a problem of DB2 which doesn't support a lot of statement in the same transaction or what ?
      Any suggestion ?