You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Anthony Kong <an...@ufjia.com> on 2003/02/25 10:33:58 UTC
RE: QueryBySQL and update statement (Additional information)
Hi, all,
I have some extra information.
The target database is MSSQL. I found that if I run the update statment in a
query analyser and then go back to my application to try again, the update
statement will be fired. It seems strange to me. Is it an expected
behaviour?
Regard,
Anthony
-----Original Message-----
From: Anthony Kong [mailto:anthony.kong@ufjia.com]
Sent: Tuesday, February 25, 2003 4:49 PM
To: 'ojb-user@db.apache.org'
Subject: QueryBySQL and update statement
Hi, all,
I am using 0.9.8. I try to use QueryBySQL to apply an "update" clause on a
few thousand records. I did not apply pb.getCollectionByQuery() on this sql
object because it will fire "no resultset returned" error. Fair enough. So I
did a pb.getCount(query_by_sql) instead. As far as I can see from the sql
trace, a "select count(*) from object" table is fired instead of my update
statement.
I would like to know more about how to use QueryBySQL with an "update" sql
statement.
Regards,
Anthony