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.

why dbexpress(delphi) driver lock table

4 posts in General Discussion Last posting was on 2005-05-17 13:27:35.0Z
zmars Posted on 2005-05-16 11:07:47.0Z
From: "zmars" <zmars@zmail.ru>
Newsgroups: ianywhere.public.general
Subject: why dbexpress(delphi) driver lock table
Lines: 34
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
X-Original-NNTP-Posting-Host: 212.57.188.82
Message-ID: <42887ef4@forums-2-dub>
X-Original-Trace: 16 May 2005 04:07:32 -0700, 212.57.188.82
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 May 2005 04:07:33 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 May 2005 04:07:47 -0700
X-Trace: forums-1-dub 1116241667 10.22.108.75 (16 May 2005 04:07:47 -0700)
X-Original-Trace: 16 May 2005 04:07:47 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4466
Article PK: 8275

I use D7.1 with Sybase ASA 9.02
dbexpres driver: dbexpasa.dll - 7.1.1503.28295
(http://www.sybase.com/detail?id=1027878)

example:
//////////////////////////////////////////
//Connection: TSQLConnection;
//SQLQuery1: TSQLQuery;
//DataSetProvider1: TDataSetProvider;
//ClientDataSet1: TClientDataSet;

//select ID, DocNumber from invoice where ID=1;

ClientDataSet1.Open;
ClientDataSet1.Edit;
ClientDataSet1DocNumber.AsInteger := 10;
ClientDataSet1.Post;
ClientDataSet1.ApplyUpdates(0);

ClientDataSet1.Close;
ClientDataSet1.Open;

ClientDataSet1.Close;
SQLQuery1.Close;

//////////////////////////////////////////

after TClientDataSet.ApplyUpdates and ClientDataSet1.Open table "invoice"
has shared lock
why?
thanx


Breck Carter [TeamSybase] Posted on 2005-05-16 15:49:02.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: why dbexpress(delphi) driver lock table
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <uvfh8117e9gaodaicn9mdrtue7vbsb0fps@4ax.com>
References: <42887ef4@forums-2-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: bcarter.sentex.ca
X-Original-Trace: 16 May 2005 08:48:51 -0700, bcarter.sentex.ca
Lines: 49
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 May 2005 08:48:54 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 May 2005 08:49:02 -0700
X-Trace: forums-1-dub 1116258542 10.22.108.75 (16 May 2005 08:49:02 -0700)
X-Original-Trace: 16 May 2005 08:49:02 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4469
Article PK: 8280

If the shared lock has NULL in the "lock_name" column, it is not a row
lock. It is a table schema lock. If the "lock_type" is 'S' then it is
a simple table schema lock which does not prevent any row updates, but
it does prevent schema changes (ALTER TABLE, CREATE INDEX, etc).

Breck

On 16 May 2005 04:07:47 -0700, "zmars" <zmars@zmail.ru> wrote:

> I use D7.1 with Sybase ASA 9.02
> dbexpres driver: dbexpasa.dll - 7.1.1503.28295
>(http://www.sybase.com/detail?id=1027878)
>
> example:
> //////////////////////////////////////////
> //Connection: TSQLConnection;
> //SQLQuery1: TSQLQuery;
> //DataSetProvider1: TDataSetProvider;
> //ClientDataSet1: TClientDataSet;
>
> //select ID, DocNumber from invoice where ID=1;
>
> ClientDataSet1.Open;
> ClientDataSet1.Edit;
> ClientDataSet1DocNumber.AsInteger := 10;
> ClientDataSet1.Post;
> ClientDataSet1.ApplyUpdates(0);
>
> ClientDataSet1.Close;
> ClientDataSet1.Open;
>
> ClientDataSet1.Close;
> SQLQuery1.Close;
>
> //////////////////////////////////////////
>
> after TClientDataSet.ApplyUpdates and ClientDataSet1.Open table "invoice"
>has shared lock
> why?
> thanx
>
>

--
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


Mars Posted on 2005-05-16 21:38:17.0Z
From: "Mars" <zmars@zmail.ru>
Newsgroups: ianywhere.public.general
References: <42887ef4@forums-2-dub> <uvfh8117e9gaodaicn9mdrtue7vbsb0fps@4ax.com>
Subject: Re: why dbexpress(delphi) driver lock table
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-Original-NNTP-Posting-Host: 3512-939999-244.dialup.surnet.ru
Message-ID: <428912c5@forums-2-dub>
X-Original-Trace: 16 May 2005 14:38:13 -0700, 3512-939999-244.dialup.surnet.ru
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 May 2005 14:38:14 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 May 2005 14:38:17 -0700
X-Trace: forums-1-dub 1116279497 10.22.108.75 (16 May 2005 14:38:17 -0700)
X-Original-Trace: 16 May 2005 14:38:17 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4470
Article PK: 8281

Thank You
I just want to know - it's bug (feature) in my code or in dbexpress driver.
"Shared lock" remains after closing or destruction dataset and query.

"Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com> wrote in
message
> If the shared lock has NULL in the "lock_name" column, it is not a row
> lock. It is a table schema lock. If the "lock_type" is 'S' then it is
> a simple table schema lock which does not prevent any row updates, but
> it does prevent schema changes (ALTER TABLE, CREATE INDEX, etc).
>
> Breck


Breck Carter [TeamSybase] Posted on 2005-05-17 13:27:35.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: why dbexpress(delphi) driver lock table
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <07sj81tim2b1mk404s00tfs3t9kdfpshq5@4ax.com>
References: <42887ef4@forums-2-dub> <uvfh8117e9gaodaicn9mdrtue7vbsb0fps@4ax.com> <428912c5@forums-2-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: bcarter.sentex.ca
X-Original-NNTP-Posting-Host: bcarter.sentex.ca
Date: 17 May 2005 06:27:35 -0700
X-Trace: forums-1-dub 1116336455 64.7.134.118 (17 May 2005 06:27:35 -0700)
X-Original-Trace: 17 May 2005 06:27:35 -0700, bcarter.sentex.ca
Lines: 30
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4471
Article PK: 8278

It is not a bug. It is expected behaviour. The lock is not going to
block anything *except* another connection that attempts to *alter*
the schema. If you want to release the lock, do a commit or
disconnect.

Breck

On 16 May 2005 14:38:17 -0700, "Mars" <zmars@zmail.ru> wrote:

>Thank You
>I just want to know - it's bug (feature) in my code or in dbexpress driver.
>"Shared lock" remains after closing or destruction dataset and query.
>
>
>"Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com> wrote in
>message
>> If the shared lock has NULL in the "lock_name" column, it is not a row
>> lock. It is a table schema lock. If the "lock_type" is 'S' then it is
>> a simple table schema lock which does not prevent any row updates, but
>> it does prevent schema changes (ALTER TABLE, CREATE INDEX, etc).
>>
>> Breck
>

--
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