shifeng zhao wrote:
> hi, i was following the tutorial of using
> scrollable result set as defined in
> jdbc 2.0 api. unfortunately, i get the following
> error
>
> mySQL 4.1.0-alpha-max-debug
> mysql-connector-java-3.0.9-stable-bin.jar
>
> throw Exception:
> com.mysql.jdbc.NotUpdatable: Result Set not
> updatable.This result
> se
> t must come from a statement that was created with
> a result set type of
> ResultSe
> t.CONCUR_UPDATABLE, the query must select only one
> table, and must select all
> pr
> imary keys from that table. See the JDBC 2.1 API
> Specification, section 5.6 for
> more details.
No current or development version of MySQL server supports updatable server-side cursors. Even if one did, they would very likely have the same restrictions as what the JDBC driver enforces now, which is basically one table, the table must have a primary key, and the query that created the cursor must select all components of that primary key.
Quite a few databases have this restriction (which is why it's allowed by the JDBC specification in the first place).
-Mark
Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html