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.

After retrieve the Table has a SHARED LOCK

3 posts in DataWindow .NET Last posting was on 2004-10-29 15:39:51.0Z
Peter Müller Posted on 2004-10-28 16:03:32.0Z
From: "Peter Müller" <Peter.Mueller@gmx.net>
Newsgroups: sybase.public.datawindow.net
Subject: After retrieve the Table has a SHARED LOCK
Lines: 39
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: ex.sms-eumuco.de
X-Original-NNTP-Posting-Host: ex.sms-eumuco.de
Message-ID: <41811854@forums-1-dub>
Date: 28 Oct 2004 09:03:32 -0700
X-Trace: forums-1-dub 1098979412 195.126.202.3 (28 Oct 2004 09:03:32 -0700)
X-Original-Trace: 28 Oct 2004 09:03:32 -0700, ex.sms-eumuco.de
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:633
Article PK: 125060

Like in the Example I do the following
See above,.
But after the retrieve the table has a shared LOCK
There is exact 1 row retrieved by the select as expected, and
RETRIEVE AS NEEDED is OFF.

I thought after the COMMIT, everything should be unblocked .
What can be the reason ????

And it is a retrieve not an update

Thanks
for your help
Peter





Dim updateTrans As Sybase.DataWindow.AdoTransaction

updateTrans = CONN_Ado_server_front.Transaction

dw_1.SetTransaction(updateTrans)

updateTrans.Transaction =
CONN_Ado_server_front.Connection.BeginTransaction()

li_rows = dw_1.Retrieve(bd.order_id)

updateTrans.Transaction.Commit()


Peter Müller Posted on 2004-10-29 09:05:55.0Z
From: "Peter Müller" <Peter.Mueller@gmx.net>
Newsgroups: sybase.public.datawindow.net
References: <41811854@forums-1-dub>
Subject: Re: After retrieve the Table has a SHARED LOCK
Lines: 62
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
X-Original-NNTP-Posting-Host: ex.sms-eumuco.de
Message-ID: <418207ef$1@forums-2-dub>
X-Original-Trace: 29 Oct 2004 02:05:51 -0700, ex.sms-eumuco.de
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 29 Oct 2004 02:05:52 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 29 Oct 2004 02:05:55 -0700
X-Trace: forums-1-dub 1099040755 10.22.108.75 (29 Oct 2004 02:05:55 -0700)
X-Original-Trace: 29 Oct 2004 02:05:55 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:639
Article PK: 125066

This happens ONLY with AdoTransaction.
If I use Sybase.Datawindow.Transaction
everything works FINE ( like in Powerbuilder ) :-)

I have first used the Example of Datawindow.net . there is used the
AdoTransaction

But Powerbuilder-Style (Sybase.Datawindow.Transaction) works fine,
like i know it from PB.

I hope, this helps other people.

Peter

"Peter Müller" <Peter.Mueller@gmx.net> wrote in message
news:41811854@forums-1-dub...
> Like in the Example I do the following
> See above,.
> But after the retrieve the table has a shared LOCK
> There is exact 1 row retrieved by the select as expected, and
> RETRIEVE AS NEEDED is OFF.
>
> I thought after the COMMIT, everything should be unblocked .
> What can be the reason ????
>
> And it is a retrieve not an update
>
> Thanks
> for your help
> Peter
>
>
>
>
>
> Dim updateTrans As Sybase.DataWindow.AdoTransaction
>
> updateTrans = CONN_Ado_server_front.Transaction
>
> dw_1.SetTransaction(updateTrans)
>
> updateTrans.Transaction =
> CONN_Ado_server_front.Connection.BeginTransaction()
>
> li_rows = dw_1.Retrieve(bd.order_id)
>
> updateTrans.Transaction.Commit()
>
>
>
>
>
>
>
>


Breck Carter [TeamSybase] Posted on 2004-10-29 15:39:51.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: sybase.public.datawindow.net
Subject: Re: After retrieve the Table has a SHARED LOCK
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <2vo4o0toe62incqo04hm76n923huid383j@4ax.com>
References: <41811854@forums-1-dub>
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: 207.250.131.20
X-Original-NNTP-Posting-Host: 207.250.131.20
Date: 29 Oct 2004 08:39:51 -0700
X-Trace: forums-1-dub 1099064391 207.250.131.20 (29 Oct 2004 08:39:51 -0700)
X-Original-Trace: 29 Oct 2004 08:39:51 -0700, 207.250.131.20
Lines: 53
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:640
Article PK: 125067

What does sa_locks say? If the lock_name is NULL and and the lock_type
is S, then it is a shared schema lock, not a row lock. It prevents
other connections from altering the table but not updating it. Schema
locks are common and generally unobtrusive.

On 28 Oct 2004 09:03:32 -0700, "Peter Müller" <Peter.Mueller@gmx.net>

wrote:

>Like in the Example I do the following
>See above,.
>But after the retrieve the table has a shared LOCK
>There is exact 1 row retrieved by the select as expected, and
>RETRIEVE AS NEEDED is OFF.
>
>I thought after the COMMIT, everything should be unblocked .
>What can be the reason ????
>
>And it is a retrieve not an update
>
>Thanks
>for your help
>Peter
>
>
>
>
>
>Dim updateTrans As Sybase.DataWindow.AdoTransaction
>
>updateTrans = CONN_Ado_server_front.Transaction
>
>dw_1.SetTransaction(updateTrans)
>
>updateTrans.Transaction =
>CONN_Ado_server_front.Connection.BeginTransaction()
>
>li_rows = dw_1.Retrieve(bd.order_id)
>
>updateTrans.Transaction.Commit()
>
>
>
>
>
>
>

--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com