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.

How can I look at @@trancount?

2 posts in Powerscript Last posting was on 2010-02-02 21:37:58.0Z
Laurel Posted on 2010-02-02 21:36:25.0Z
From: "Laurel" <FakeMail@Hotmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: How can I look at @@trancount?
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b689ad9$1@forums-1-dub>
Date: 2 Feb 2010 13:36:25 -0800
X-Trace: forums-1-dub 1265146585 10.22.241.152 (2 Feb 2010 13:36:25 -0800)
X-Original-Trace: 2 Feb 2010 13:36:25 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27267
Article PK: 761784

I want to put some code in to look at the database @@trancount value.

"Select @@trancount into :li_count;" produces a syntax error.

ls_count = "Select @@trancount into :licount;" results in dbcode = 102 and
a "syntax error" in sqlerrtext (not surprisingly).

Any suggestions?

TIA
LAS


Laurel Posted on 2010-02-02 21:37:58.0Z
From: "Laurel" <FakeMail@Hotmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b689ad9$1@forums-1-dub>
Subject: Re: How can I look at @@trancount?
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b689b36@forums-1-dub>
Date: 2 Feb 2010 13:37:58 -0800
X-Trace: forums-1-dub 1265146678 10.22.241.152 (2 Feb 2010 13:37:58 -0800)
X-Original-Trace: 2 Feb 2010 13:37:58 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27268
Article PK: 793658

Sorry, the second statement should be...

ls_count = "Select @@trancount into :licount;"
Execute immediate :ls_count using sqlca;

"Laurel" <FakeMail@Hotmail.com> wrote in message
news:4b689ad9$1@forums-1-dub...
>I want to put some code in to look at the database @@trancount value.
>
> "Select @@trancount into :li_count;" produces a syntax error.
>
> ls_count = "Select @@trancount into :licount;" results in dbcode = 102
> and a "syntax error" in sqlerrtext (not surprisingly).
>
> Any suggestions?
>
> TIA
> LAS
>