Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

execute Java from a trigger

3 posts in General Discussion Last posting was on 2009-03-11 07:44:43.0Z
Oliver Köppe Posted on 2009-03-10 15:58:50.0Z
Sender: 99a.49b680b6.1804289383@sybase.com
From: Oliver Köppe
Newsgroups: ianywhere.public.general
Subject: execute Java from a trigger
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49b68e3a.c48.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Mar 2009 07:58:50 -0800
X-Trace: forums-1-dub 1236700730 10.22.241.41 (10 Mar 2009 07:58:50 -0800)
X-Original-Trace: 10 Mar 2009 07:58:50 -0800, 10.22.241.41
Lines: 14
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7398
Article PK: 5814

Hi,

I try to call a methode on a Java object (it is not the
datatype of a column), e.g. "SELECT java.lang.Math.abs(5)".

If I call it inside a trigger I always get the 09W02
(SQLE_CURSOROP_NOT_ALLOWED) exception.

Are there any restrictions on using Java in a trigger? I
didn't found any documented.

I run ASA 6.

Thanks


Breck Carter [TeamSybase] Posted on 2009-03-10 18:00:33.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: ianywhere.public.general
Subject: Re: execute Java from a trigger
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <2kadr4lohtdu8e726vknopaorfcae88d9l@4ax.com>
References: <49b68e3a.c48.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 10 Mar 2009 10:00:33 -0800
X-Trace: forums-1-dub 1236708033 10.22.241.152 (10 Mar 2009 10:00:33 -0800)
X-Original-Trace: 10 Mar 2009 10:00:33 -0800, vip152.sybase.com
Lines: 27
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7399
Article PK: 5816

Show us the exact code.

Do you need an INTO clause to receive the result, or just code a SET
instead of SELECT? Triggers can't return result sets.

On 10 Mar 2009 07:58:50 -0800, Oliver Köppe wrote:

>Hi,
>
>I try to call a methode on a Java object (it is not the
>datatype of a column), e.g. "SELECT java.lang.Math.abs(5)".
>
>If I call it inside a trigger I always get the 09W02
>(SQLE_CURSOROP_NOT_ALLOWED) exception.
>
>Are there any restrictions on using Java in a trigger? I
>didn't found any documented.
>
>I run ASA 6.
>
>Thanks

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com


Oliver Köppe Posted on 2009-03-11 07:44:43.0Z
Sender: 99a.49b680b6.1804289383@sybase.com
From: Oliver Köppe
Newsgroups: ianywhere.public.general
Subject: Re: execute Java from a trigger
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49b76beb.1f66.1681692777@sybase.com>
References: <2kadr4lohtdu8e726vknopaorfcae88d9l@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Mar 2009 23:44:43 -0800
X-Trace: forums-1-dub 1236757483 10.22.241.41 (10 Mar 2009 23:44:43 -0800)
X-Original-Trace: 10 Mar 2009 23:44:43 -0800, 10.22.241.41
Lines: 12
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7401
Article PK: 5820

Coding SET instead of SELECT solved the problem.

Thanks

> Show us the exact code.
>
> Do you need an INTO clause to receive the result, or just
> code a SET instead of SELECT? Triggers can't return result
> sets.
>
> On 10 Mar 2009 07:58:50 -0800, Oliver Köppe wrote:
>