You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ulrich Mayring <ul...@denic.de> on 2001/02/16 18:22:14 UTC

Java Stored Procedures in

Hi all,

I'm using Sybase ASE with the Java option. That allows me to write
stored procedures in Java, which are then executed in a JVM internal to
the database. In an SQL shell I can write something like this:

select de.denic.sybase.person.nextID(new java.math.BigInteger('1234'))
as 'NEXT_ID'

This returns the next valid Person ID for a '1234' type of object.

However, within a <esql:query> block this statement returns zero rows.

Now, I realize that this Java option is proprietary to Sybase, but
shouldn't it be possible to write anything in an esql query that you can
write in an SQL shell? Or are there differences?

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: Java Stored Procedures in

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 16 Feb 2001, Ulrich Mayring wrote:

> I'm using Sybase ASE with the Java option. That allows me to write
> stored procedures in Java, which are then executed in a JVM internal to
> the database. In an SQL shell I can write something like this:
>
> select de.denic.sybase.person.nextID(new java.math.BigInteger('1234'))
> as 'NEXT_ID'
>
> This returns the next valid Person ID for a '1234' type of object.
>
> However, within a <esql:query> block this statement returns zero rows.
>
> Now, I realize that this Java option is proprietary to Sybase, but
> shouldn't it be possible to write anything in an esql query that you can
> write in an SQL shell? Or are there differences?

can't think of any. must be something in the sybase jdbc driver. you can
verify by writing a standalone jdbc app which executes that query.

- donald