Hi, The row is indeed deleted but for some reason the executeUpdate returns 0 as the num. of updated rows. I can send you a test case, but just to be sure what do you mean when you say that the "row was deleted before executing the statement"? My scenario is the following sequence of actions: 1) Delete row X from table A. Success and executeUpdate returns 1. 2) Delete row Y from table B. Row is deleted but executeUpdate returns 0.
On Jun 4, 11:43 am, Thomas Mueller <[email protected]> wrote: > Hi, > > Maybe the row was deleted before executing the statement? Could you provide > a complete, simple, reproducible test case please? > > Regards, > Thomas > > > > > > > > On Thursday, May 31, 2012, Jim wrote: > > I am using H2 embeded database. > > I try to delete a record from a table as follows: > > > PreparedStatement stmt = connection.prepareStatement("DELETE FROM > > MYTABLE WHERE id= ?", Statement.NO_GENERATED_KEYS); > > stmt.setObject(1, "1234"); > > int result = stmt.executeUpdate(); > > > The row is deleted but return count is always 0! > > Is this a bug? Am I doing something wrong here? > > > -- > > You received this message because you are subscribed to the Google Groups > > "H2 Database" group. > > To post to this group, send email to > > [email protected]<javascript:;> > > . > > To unsubscribe from this group, send email to > > [email protected] <javascript:;>. > > For more options, visit this group at > >http://groups.google.com/group/h2-database?hl=en. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
