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.

Error handle

3 posts in Objects Last posting was on 2003-01-03 18:51:55.0Z
Peter Posted on 2003-01-03 18:33:42.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Peter
Date: Fri, 3 Jan 2003 13:33:42 -0500
Subject: Error handle
Lines: 32
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_25B2B7007B06660C0065F64685256CA3.0065F67A85256CA3@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:651
Article PK: 713222

I am developing an application by using PB6.5 and Sybase 12.5. There are
several SPs containing RAISERROR. When I calling these SPs from my
front-end, Error Content is shown directly. I would like to reformat the
error content to have a better display, however I find there is no way I
can get these error from the SQLCA.

E.g.
create procedure _sp_get_abc_details
(
@key char(12)
)
as
begin
if not exists (select 1 from key_table where key = @key )
begin
raiserror 20001
return -1
end

select 1 from abc where key = @key
end
go

This SP is called by dw_1.Retrieve() from PB front-end, when this PB
statement is executed, the content of error 20001 will automatically be
display.

Would everyone tell me whether there is any way I can stop the content of
error 20001 autotmatically shown and get the content of error for
customized display. Thanks.

B/R
Peter


Chris Pollach Posted on 2003-01-03 18:37:35.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Chris Pollach" <cpollach@ajja.com>
From: "Chris Pollach" <cpollach@ajja.com>
Subject: Re: Error handle
Date: Fri, 3 Jan 2003 13:37:35 -0500
Lines: 43
Organization: STD Inc
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: firewall.scc-csc.gc.ca 209.47.227.130
Message-ID: <364_TuMTbm1sCHA.199@forums.sybase.com>
References: <364_25B2B7007B06660C0065F64685256CA3.0065F67A85256CA3@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:650
Article PK: 713216

Peter;

Use SQLCA.SQLReturnData.

Regards ... Chris

<Peter> wrote in message
news:25B2B7007B06660C0065F64685256CA3.0065F67A85256CA3@webforums...
> I am developing an application by using PB6.5 and Sybase 12.5. There are
> several SPs containing RAISERROR. When I calling these SPs from my
> front-end, Error Content is shown directly. I would like to reformat the
> error content to have a better display, however I find there is no way I
> can get these error from the SQLCA.
>
> E.g.
> create procedure _sp_get_abc_details
> (
> @key char(12)
> )
> as
> begin
> if not exists (select 1 from key_table where key = @key )
> begin
> raiserror 20001
> return -1
> end
>
> select 1 from abc where key = @key
> end
> go
>
> This SP is called by dw_1.Retrieve() from PB front-end, when this PB
> statement is executed, the content of error 20001 will automatically be
> display.
>
> Would everyone tell me whether there is any way I can stop the content of
> error 20001 autotmatically shown and get the content of error for
> customized display. Thanks.
>
> B/R
> Peter


Scott Morris Posted on 2003-01-03 18:51:55.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Scott Morris" <bogus@microsoft.com>
Subject: Re: Error handle
Date: Fri, 3 Jan 2003 13:51:55 -0500
Lines: 40
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: ip45-gadivinv-a8.atl1.exsbs.net 65.205.162.45
Message-ID: <364_0ly$yu1sCHA.155@forums.sybase.com>
References: <364_25B2B7007B06660C0065F64685256CA3.0065F67A85256CA3@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:649
Article PK: 713218

If using pfc, look at the dberror events in the u_dw and n_ds and the
pfc_dberror event in w_master.

<Peter> wrote in message
news:25B2B7007B06660C0065F64685256CA3.0065F67A85256CA3@webforums...
> I am developing an application by using PB6.5 and Sybase 12.5. There are
> several SPs containing RAISERROR. When I calling these SPs from my
> front-end, Error Content is shown directly. I would like to reformat the
> error content to have a better display, however I find there is no way I
> can get these error from the SQLCA.
>
> E.g.
> create procedure _sp_get_abc_details
> (
> @key char(12)
> )
> as
> begin
> if not exists (select 1 from key_table where key = @key )
> begin
> raiserror 20001
> return -1
> end
>
> select 1 from abc where key = @key
> end
> go
>
> This SP is called by dw_1.Retrieve() from PB front-end, when this PB
> statement is executed, the content of error 20001 will automatically be
> display.
>
> Would everyone tell me whether there is any way I can stop the content of
> error 20001 autotmatically shown and get the content of error for
> customized display. Thanks.
>
> B/R
> Peter