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.

SQLCA and DBError

4 posts in Objects Last posting was on 2003-11-11 10:25:54.0Z
cvp Posted on 2003-11-10 14:27:50.0Z
From: "cvp" <vtsikra@atlant-inform.ru>
Newsgroups: sybase.public.powerbuilder.objects
Subject: SQLCA and DBError
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
X-Original-NNTP-Posting-Host: prtl.atlant-inform.ru
Message-ID: <3fafa1a5@forums-2-dub>
X-Original-Trace: 10 Nov 2003 06:33:09 -0800, prtl.atlant-inform.ru
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Nov 2003 06:19:01 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Nov 2003 06:27:50 -0800
X-Trace: forums-1-dub 1068474470 10.22.108.75 (10 Nov 2003 06:27:50 -0800)
X-Original-Trace: 10 Nov 2003 06:27:50 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7657
Article PK: 734938

Good day.
I want handling all database errors that my application doing in runtime.
When my application execute update function of Datawindow component i can
extend dbError event.
But what must i do when my application execute some sql statement, for
example:
delete from bb_tml where id_r = -1 using sqlca;
can i handle any event after execution it? or i can see sqlca.sqlcode or
sqlca.sqldbcode only?


Chris Keating (iAnywhere Solutions) Posted on 2003-11-10 14:53:19.0Z
From: "Chris Keating \(iAnywhere Solutions\)" <FightSpam_keating@iAnywhere.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <3fafa1a5@forums-2-dub>
Subject: Re: SQLCA and DBError
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: keating-xp.sybase.com
X-Original-NNTP-Posting-Host: keating-xp.sybase.com
Message-ID: <3fafa65f$2@forums-1-dub>
Date: 10 Nov 2003 06:53:19 -0800
X-Trace: forums-1-dub 1068475999 172.31.140.66 (10 Nov 2003 06:53:19 -0800)
X-Original-Trace: 10 Nov 2003 06:53:19 -0800, keating-xp.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7658
Article PK: 734935

An error in embedded SQL does not trigger an event. Error handling uses the
transaction object SQLCode, SQLDBCode, and SQLErrText.
--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

****************************************************************************
*
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

****************************************************************************
*

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

****************************************************************************
*

"cvp" <vtsikra@atlant-inform.ru> wrote in message
news:3fafa1a5@forums-2-dub...
> Good day.
> I want handling all database errors that my application doing in runtime.
> When my application execute update function of Datawindow component i can
> extend dbError event.
> But what must i do when my application execute some sql statement, for
> example:
> delete from bb_tml where id_r = -1 using sqlca;
> can i handle any event after execution it? or i can see sqlca.sqlcode or
> sqlca.sqldbcode only?
>
>
>
>
>
>


cvp Posted on 2003-11-11 10:25:54.0Z
From: "cvp" <vtsikra@atlant-inform.ru>
Newsgroups: sybase.public.powerbuilder.objects
References: <3fafa1a5@forums-2-dub>
Subject: Re: SQLCA and DBError
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
X-Original-NNTP-Posting-Host: prtl.atlant-inform.ru
Message-ID: <3fb0ba74@forums-2-dub>
X-Original-Trace: 11 Nov 2003 02:31:16 -0800, prtl.atlant-inform.ru
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 11 Nov 2003 02:17:01 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 11 Nov 2003 02:25:54 -0800
X-Trace: forums-1-dub 1068546354 10.22.108.75 (11 Nov 2003 02:25:54 -0800)
X-Original-Trace: 11 Nov 2003 02:25:54 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7664
Article PK: 734940

Thank you.
"cvp" <vtsikra@atlant-inform.ru> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:3fafa1a5@forums-2-dub...

> Good day.
> I want handling all database errors that my application doing in runtime.
> When my application execute update function of Datawindow component i can
> extend dbError event.
> But what must i do when my application execute some sql statement, for
> example:
> delete from bb_tml where id_r = -1 using sqlca;
> can i handle any event after execution it? or i can see sqlca.sqlcode or
> sqlca.sqldbcode only?
>
>
>
>
>
>


Matthew Chestnut Posted on 2003-11-10 15:11:15.0Z
From: Matthew Chestnut <matthew_chestnut at hotmail dot com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: SQLCA and DBError
Message-ID: <51avqv44stb57qdgse1b0cf0uu6i99p2hl@4ax.com>
References: <3fafa1a5@forums-2-dub>
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: 65.212.74.40
X-Original-Trace: 10 Nov 2003 07:16:35 -0800, 65.212.74.40
Lines: 21
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Nov 2003 07:02:27 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Nov 2003 07:11:15 -0800
X-Trace: forums-1-dub 1068477075 10.22.108.75 (10 Nov 2003 07:11:15 -0800)
X-Original-Trace: 10 Nov 2003 07:11:15 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7659
Article PK: 734946

You need to check the return code. For example:

delete from bb_tml where id_r = -1 using sqlca;
if sqlca.sqlcode = -1 then
PopulateError(sqlca.sqldbcode, sqlca.sqlerrtext)
// etc.
end if

On 10 Nov 2003 06:27:50 -0800, "cvp" <vtsikra@atlant-inform.ru> wrote:

>Good day.
>I want handling all database errors that my application doing in runtime.
>When my application execute update function of Datawindow component i can
>extend dbError event.
>But what must i do when my application execute some sql statement, for
>example:
> delete from bb_tml where id_r = -1 using sqlca;
>can i handle any event after execution it? or i can see sqlca.sqlcode or
>sqlca.sqldbcode only?