RE: Why oh why don't my updates stick?
<[email protected]> Mon, 31 Jul 2006 14:49:42 -0500
| Newsgroups | gmane.comp.db.mckoi |
|---|---|
| Message-ID | <9A0734F90F2CBB4D94337E0248CA37DD0E8BB8@msgswbiadsm30.wellsfargo.com> |
Thanks much for the suggestion Jim. Turns out that I wasn't updating any rows... The field I was using in the Where clause was a long, and McKoi will not find the row if quotes are used. (LOB_ID=1 not LOB_ID='1') Evidently MS SQL server is more forgiving. Thanks again, I feel much more sane now that my JUnit tests run green again. :-D Mary Whetsel -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jim McBeath Sent: Wednesday, July 26, 2006 5:14 PM To: [email protected] Subject: Re: Why oh why don't my updates stick? On Wed, Jul 26, 2006 at 03:05:55PM -0500, [email protected] wrote: Instead of using > updateStatement.execute(updateSQL.toString()); try int n = updateStatement.executeUpdate(updateSQL.toString()); The return value (n) is the number of rows updated, so you can see if mckoi thinks your statement should have updated a row. -- Jim --------------------------------------------------------------- Mckoi SQL Database mailing list http://www.mckoi.com/database/ To unsubscribe, send a message to [email protected] --------------------------------------------------------------- Mckoi SQL Database mailing list http://www.mckoi.com/database/ To unsubscribe, send a message to [email protected]