11 messages in com.mysql.lists.javaRE: Why is this UPDATE NOT Working| From | Sent On | Attachments |
|---|---|---|
| Ramesh | 05 Dec 2003 12:10 | |
| Jeff Mathis | 05 Dec 2003 12:27 | |
| Jeff Mathis | 05 Dec 2003 13:20 | |
| Ramesh | 05 Dec 2003 13:20 | |
| Ramesh | 05 Dec 2003 13:29 | |
| Ramesh | 05 Dec 2003 13:47 | |
| Kevin Fries | 05 Dec 2003 13:57 | |
| Ramesh | 05 Dec 2003 14:22 | |
| Kevin Fries | 05 Dec 2003 14:42 | |
| Ramesh | 05 Dec 2003 16:45 | |
| Ramesh | 05 Dec 2003 19:24 |
| Subject: | RE: Why is this UPDATE NOT Working![]() |
|---|---|
| From: | Ramesh (ram...@objectevolution.com) |
| Date: | 12/05/2003 02:22:26 PM |
| List: | com.mysql.lists.java |
Kevin,
When you execute the preparedStatement, what value is returned?
2
Also, have you double-checked your bound parameters?
Yes
You've ensured that the values are the same as what you've submitted via the other tools?
Yes
Finally, what SQL types are : NODE_ID and MASTER_ID ?
both are mediumint, table type is: InnoDB
thanks for your help.
Kevin
-----Original Message----- From: Ramesh [mailto:ram...@objectevolution.com] Sent: Friday, December 05, 2003 1:48 PM To: Rodney Woodruff Cc: ja...@lists.mysql.com Subject: RE: Why is this UPDATE NOT Working
Yes, the Table and column names have been modified/masked. I should have mentioned that.
thx.
On Fri, 5 Dec 2003, Rodney Woodruff wrote:
I have been watching this thread. However, in the trace below one thing keeps sticking out at me. That is the line that prints "12/5/03 9:35 AM: statement to execute : UPDATE <TABLE>". The part that is confusing is '<TABLE>' Did you omit this from the post for security reasons? If not, I would suspect that a table name should be there.
Just a shot in the dark.
-- Rodney
Rodney J. Woodruff Senior Software Engineer Fry, Incorporated Ann Arbor, MI 48108 (734) 887-7428 rwoo...@fry.com
-----Original Message----- From: Ramesh [mailto:ram...@objectevolution.com] Sent: Friday, December 05, 2003 4:30 PM To: Jeff Mathis Cc: ja...@lists.mysql.com Subject: Re: Why is this UPDATE NOT Working
No, they are not :-)
On Fri, 5 Dec 2003, Jeff Mathis wrote:
Not too long ago, I got tripped up by something like this. turned out I was issuing commit() on the wrong connection.
are your id fields really strings?
Ramesh wrote:
No, other updates work fine, just this one for some
reason is not
working.
I also tried doing this with: Aspire (http://www.onjava.com/pub/a/onjava/2002/10/30/aspire.html)
That gives me a message saying the rows were updated, but I go see in the tables and it is not the case.
12/5/03 9:35 AM: statement to execute : UPDATE <TABLE> SET NODE_ID = '550' WHERE MASTER_ID = '157' AND NODE_ID = '552' 12/5/03 9:35 AM: Executing : UPDATE <TABLE> SET NODE_ID = '550' WHERE MASTER_ID = '157' AND NODE_ID = '552' 12/5/03 9:35 AM: Number of rows updated : 2 12/5/03 9:35 AM: db: Transaction being commited for request :request.UPDATE_PARENT_ID 12/5/03 9:35 AM: cp: Returning connection for pool aDB 12/5/03 9:35 AM: cp: Requesting a connection from data source aDB 12/5/03 9:35 AM: db: commit recognized
But as mentioned earlier, the same thing works fine from: SQLyog.
So, little confused as to where the problem might be.
thx
On Fri, 5 Dec 2003, Jeff Mathis wrote:
do you have auto-commit turned off?
Ramesh wrote:
Hi,
I am using: Driver: mysql-connector-java-3.0.9-stable-bin.jar Database: mysql 4.0.14
I am issuing a update stmt like: UPDATE <TABLE> SET NODE_ID = ? WHERE MASTER_ID = ? AND NODE_ID = ?
Using a PreparedStatement to do so, but it is just
failing, no
errors.
On the other hand, if I use a tool like: SQLyog and issue the same statement, it works fine.
What could be happening here?
Appreciate your input.
thanks, Ramesh
-- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe:
http://lists.mysql.com/java?unsub=jmat...@predict.com
-- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe:
http://lists.mysql.com/java?> unsub=jmat...@predict.com
-- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/java?unsub=kfr...@kurant.com




