Marc,

Its even worse ,after further investigation i found no code (API + basic) to run a stored procedure with parameters.
So I would be very happy i someone could give a hint :-)

thanks for any help

Fernand
you told : "That makes, in consequence, stored procedures unusable with
OpenOffice base".

Well, I probably need to refine that a bit, indeed:  It makes stored
procedures unusable in OpenOffice base using the query editor.

This is countrary to what the DEV guide tells us ????

Stored procedures are server-side processes execute several SQL commands
in a single step, and can be embedded in a server language for stored
procedures with enhanced control capabilities. A procedure call usually
has to be parameterized, and the results are result sets and additional
out parameters. Stored procedures are handled by the method
|prepareCall()| of the interface com.sun.star.sdbc.XConnection
<http://api.openoffice.org/docs/common/ref/com/sun/star/sdbc/XConnection.html>.


com::sun::star::sdbc::XPreparedStatement prepareCall( [in] string sql)

The method |prepareCall()| takes a an SQL statement that may contain one
or more '|?|' in parameter placeholders. It returns a
com.sun.star.sdbc.CallableStatement
<http://api.openoffice.org/docs/common/ref/com/sun/star/sdbc/CallableStatement.html>.
A |CallableStatement| is a com.sun.star.sdbcx.PreparedStatement
<http://api.openoffice.org/docs/common/ref/com/sun/star/sdbcx/PreparedStatement.html>
with two additional interfaces for out parameters:

com.sun.star.sdbc.XOutParameters
<http://api.openoffice.org/docs/common/ref/com/sun/star/sdbc/XOutParameters.html>
is used to declare parameters as out parameters. All out parameters must
be registered before a stored procedure is executed.


greetz

Fernand
If we talking about "General users" it could been a good start to make
StoredProcedures visible in the GUI before we adding bells like
parameters etc....
I would not call parameters to function calls "bells", I would call it a
necessity.

Other users (who have acces to there own Databases) do not need other
than Native Mode because they written already the Stored Procedures in
the very same Native SQL
Stored procedures usually need parameters, which you can not enter in
native mode.  "That makes, in consequence, stored procedures unusable
with OpenOffice base".

- Marc

Greetz

Fernand
Hi Marc,

Maybe a third mode could help here:  Semi-Native SQL, where base would
only scan for parameter definitions using the :<name> scheme.
Hmm, don't like this idea too much. Basically, it would be completely
intransparent to the user. This is not per se a bad thing :), but if
things are prone to failure (and parsing queries which the user said
"don't even attempt to do" *are*), then we should not do them silently,
and without a chance for the user to intervene.

[0=1]
What a hack ;)
Well, yes, kind of :). On the other hand, it worked well for a
decade or
so, and as said, I assume the original authors had reasons for doing
it.
Still, I'd say we should think about removing it.

Ciao
Frank

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

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



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


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

Reply via email to