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.

Strange lock ?!

2 posts in Windows NT Last posting was on 2000-04-14 12:43:19.0Z
Vitaly Barinov Posted on 2000-03-29 12:18:45.0Z
Message-ID: <38E1F4A5.C541A8FF@hotmail.com>
Date: Wed, 29 Mar 2000 16:18:45 +0400
From: Vitaly Barinov <vitaly_barinov@hotmail.com>
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
Subject: Strange lock ?!
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 29
NNTP-Posting-Host: vitaly.vana.spb.ru 195.201.76.5
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2375
Article PK: 1089806

Dear colleagues,

I currently develop application for entering and editing data in Sybase
database. Sybase is version 11.0.3 and runs under Linux RedHat 6.1. The
client part of application had to be written within very short period of

time therefore I've written it in C++ Builder 4.0. It works via Borland
Database Engine like that:

Client -> BDE 5.1.1 -> BDE native Sybase driver -> Open Client -> Sybase

Single copy of application works correctly, but as I tried two different

copies on two computers, I encountered the problem. The essence of it is

like that:

I open the table, say Table1, in Client1.
I open the same Table1 in Client2.
I try to execute the query "delete something from Table1" in Client2. At

that the lock occurs. As I close Client1, everything goes OK.

I understand that this problem may be due to BDE, but don't exclude it
may occur if use raw OpenClient.

Is it so? What can be done to correct it (isolation levels, etc.)?

Any help will be highly appreciated.

Vitaly
Barinov.


Andre Felipe Barrocas Moreira Posted on 2000-04-14 12:43:19.0Z
Message-ID: <38F71267.AA0498C3@ihcap.com.br>
Date: Fri, 14 Apr 2000 09:43:19 -0300
From: Andre Felipe Barrocas Moreira <support@ihcap.com.br>
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
Subject: Re: Strange lock ?!
References: <38E1F4A5.C541A8FF@hotmail.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 44
NNTP-Posting-Host: cs0112.esquadro.com.br 200.214.4.62
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2320
Article PK: 1089749

What kind of isolation level are you using ?
When using Isolation Level 1 (default - commited read) a simple select keeps
the shared lock on the pages affected by the query. Try using isolation
level 0 (dirty read) whenever is possible. Isolation Level 0 keeps no lock
on pages read by selects, but it doesn't give you consistency about data
that you read (possible phantom read).

Marcelo Teixeira Affonso
Icatu Hartford Capitalizacao - Rio de Janeiro - Brazil
--------------------------------------------------------------------------------------------

Vitaly Barinov wrote:

> Dear colleagues,
>
> I currently develop application for entering and editing data in Sybase
> database. Sybase is version 11.0.3 and runs under Linux RedHat 6.1. The
> client part of application had to be written within very short period of
>
> time therefore I've written it in C++ Builder 4.0. It works via Borland
> Database Engine like that:
>
> Client -> BDE 5.1.1 -> BDE native Sybase driver -> Open Client -> Sybase
>
> Single copy of application works correctly, but as I tried two different
>
> copies on two computers, I encountered the problem. The essence of it is
>
> like that:
>
> I open the table, say Table1, in Client1.
> I open the same Table1 in Client2.
> I try to execute the query "delete something from Table1" in Client2. At
>
> that the lock occurs. As I close Client1, everything goes OK.
>
> I understand that this problem may be due to BDE, but don't exclude it
> may occur if use raw OpenClient.
>
> Is it so? What can be done to correct it (isolation levels, etc.)?
>
> Any help will be highly appreciated.
>
> Vitaly
> Barinov.