XOutParameters

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

XOutParameters

Peter Eberlein-3
Hi Frank, hi Ocke,

Java has a method registerOutParameter(int,int), which e.g. works with
Oracle jdbc like registerOutParameter(1,OracleTypes.CURSOR).

Interface XOutParameters needs a third parameter typeName, which I tried
with
registerOutParameter(1,com.sun.star.sdbc.DataType.REF,"oracle.jdbc.OracleTypes.REF").

"Invalid name pattern" is the answer from sdbc.

It's my first contact with stored procedures, so perhaps you can give me
a hint how to handle this.

Regards

Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: XOutParameters

Fernand Vanrie
Peter ,

This thinks are not working, i filed issues for it

if it is urgent you can try my work around

SUB TESTstoredprocedurecall
oBaseContext = CreateUnoService("com.sun.star.sdb.DatabaseContext")
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
oResultSet1.next
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

Hope it helps

Fernand

> Hi Frank, hi Ocke,
>
> Java has a method registerOutParameter(int,int), which e.g. works with
> Oracle jdbc like registerOutParameter(1,OracleTypes.CURSOR).
>
> Interface XOutParameters needs a third parameter typeName, which I
> tried with
> registerOutParameter(1,com.sun.star.sdbc.DataType.REF,"oracle.jdbc.OracleTypes.REF").
>
>
> "Invalid name pattern" is the answer from sdbc.
>
> It's my first contact with stored procedures, so perhaps you can give
> me a hint how to handle this.
>
> Regards
>
> Peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: XOutParameters

Peter Eberlein-3
Hi Fernand,

Am 18.02.2010 17:14, schrieb Fernand Vanrie:
> Peter ,
>
> This thinks are not working, i filed issues for it
>
> if it is urgent you can try my work around
>
I did read this thread,

Thanks

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]