[dba-dev] Calling a stored procedure returns sdbc.SQLException

2010-02-15 Thread Fernand Vanrie
I can get a resultset from a Stored Procedure (on MySQL) using a simple 
Statement or using a prepareStatement: "call StoredProcdurename()" but 
only once. after running the statement a second time OO trows a 
sdbc.SQLExepetion "Commands out of sync, you can not run this command 
now" I have to restart OO before this error disapear

is tghis a bug or wath am i doing wrong 
Fernand


-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



Re: [dba-dev] Problem: OpenOffice Base and PostgreSQL stored procedures

2010-02-15 Thread Fernand Vanrie

Drew ,
You says : "sure there is some access to the stored procedures with the 
current implementation but it isn't yet ready to take full advantage them"
I know you are a bussy man and always prepared to help, but can you 
explaines a bit more and gives us some hints from wath can already been 
done  and what is on a futures list :-)

Thanks
Fernand

Marc Santhoff wrote:

Am Samstag, den 13.02.2010, 18:22 +0100 schrieb Marc Santhoff:
 

And just here i am lost: how works this registering of the
  

parameters ?

Dunno, my assumption was that it is not strictly necessary ... I tink
someone else has to answer this question.



A quick look into chapter 8 of the HSQL docs shows:


The routine body is a SQL statement. In its simplest form, the body is a
single SQL statement. A simple example of a function is given below:


An example of the use of the function in an SQL statement is given
below:

SELECT an_hour_before(event_timestamp) AS notification_timestamp, 
event_name FROM events;



The other SQL statement for calling procedures, in contrast to
functions, would be "CALL".

So chances are good that a prepared statement on the OOo side of things
is sufficient for transferring parameters to a statement build up by a
stored function or stored procedure call.

HTH anyway,
Marc

  


Hi Marc

That is good for single return values, but not for returning multiple 
parameters or for returning a cursor to a result set.


So, "sure there is some access to the stored procedures with the 
current implementation but it isn't yet ready to take full advantage 
them" - IMO.


Thanks,

Drew





-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org