|
Daniel John Debrunner wrote: I assume you are refering to the JDBC 102 spec , i am aware of this verbage.Lance J. Andersen wrote:Note that executing a statement on *another* statement object in the same connection no longer closes a result set, The above wording does not specify what happens to the Statement that was active. Is it commited or rolled back? I am sure your milage varies as it does if you do a Connection.close() and there is an active transaction (The SQL standard differs from the reality of vendors. Some commit, some rollback some just give an Error and expect the user to address it as the standard suggests) The JDBC 3 spec intermixed when a ResultSet was closed with auto-commit semantics and these both are seperate scenarios. These should have been seperated.JDBC 3 "For Select statements, the statement is complete when the associated result set is closed. The result set is closed as soon as one of the following occurs: [...] - another Statement object is executed on the same connection" Pretty explicit in both cases, only a single statement can be active in auto-commit mode. JDBC 4.0 is proposing a change that multiple statements, possibly including updates, can be active when in auto-commit mode. I wonder if that was really the intent of EG for these changes? The verbage in JDBC 3 WRT to having another Statement executed on the same connection was not explict WRT auto commit as it was written and led to confusion. Perhaps 1 more bullet could be added to clarify this *specific* scenario as to the state of the ResultSet, i will see.
|
- Re: I need some advice to choose database for an upc... Lance J. Andersen
- Re: I need some advice to choose database for a... Daniel John Debrunner
- Re: I need some advice to choose database for a... Michael Segel
- Re: I need some advice to choose database f... Lance J. Andersen
- Re: I need some advice to choose databa... Michael Segel
- Re: I need some advice to choose da... Lance J. Andersen
- Re: I need some advice to choose databa... Will Senn
- Re: I need some advice to choose da... Michael Segel
- Re: I need some advice to choo... Will Senn
- Re: I need some advice to choose database for a... Craig L Russell
