Issue 109328

Summary: Statements must been closed after calling a Stored Porcedure in MySQL
Product: Base Reporter: sos <sos>
Component: codeAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: drewjensen.inbox, issues, sos
Version: OOo 1.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description sos 2010-02-16 12:45:07 UTC
Using MySQL natice connector 
trye this code

SUB TESTstoredprocedurecall
oBaseContext = CreateUnoService("")
oDB = oBaseContext.getByName("mysql_native")
oCon = oDB.getConnection("user", "Password")
oStatement = oCon.createStatement()
sSQL1 = "call teststoredprocedure('Parm1', '┬ĘParm2')" ' must been pased in 
right order
ostatement.execute(sSQL1)' gives True
oResultset1 = ostatement.getresultset
print oResultset1.getstring(1)' confirmes the selection based on parameters
ostatement.close ' must been done otherwise we ran in a 
Exception:'sdbc.SQLExepetion "Commands out of sync, you can not run this 
command now"
'after this exception you need to restart OO or dispose oDB
ocon.close ' just to be sure everyting isclosed
end sub

this  Exception "Commands out of sync, you can not run this command now" make 
the use of "PreparedStatements"  useless
Comment 1 drewjensen.inbox 2010-02-21 16:48:27 UTC
@sos what you describe is true, but I'm not at all sure this is a defect. The
requirment to close your server side cursors is TTBOMK required. having to do so
explicitly is IMO the norm (Basic Python Java), although in some environments,
particular web based tools this requirement may be handled by a library and you
may not explicitly have to manage this.

Comment 2 sos 2010-02-22 08:18:18 UTC
@Drew OK but if we need to do that also with a PreparedStatement ? and later 
(when thins works) also  with a "preparedcall" ?
It makes the "prepare" things useless no ?