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.

ADSExecuteSQLDirect and locking a table

2 posts in Visual Basic Last posting was on 2006-09-26 14:55:25.0Z
"Paulo" <projectolda (NO SPAM) Posted on 2006-09-25 16:45:46.0Z
From: "Paulo" <projectolda (NO SPAM) @sapo.pt>
Newsgroups: Advantage.Visual_Basic
Subject: ADSExecuteSQLDirect and locking a table
Date: Mon, 25 Sep 2006 17:45:46 +0100
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 82.155.114.136
Message-ID: <4518066b@solutions.advantagedatabase.com>
X-Trace: 25 Sep 2006 10:40:11 -0700, 82.155.114.136
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!82.155.114.136
Xref: solutions.advantagedatabase.com Advantage.Visual_Basic:1107
Article PK: 1137900

Hi all,

I need to do an UPDATE on a table but want to ensure the table is not being
used.
But, if I open and lock it, the ADSExecuteSQLDirect doesn?t work. It says
the table is being used.
Is there another way to do this?

B.R.,
Paulo


Mark Wilkins Posted on 2006-09-26 14:55:25.0Z
From: "Mark Wilkins" <mark@no.email>
Newsgroups: Advantage.Visual_Basic
References: <4518066b@solutions.advantagedatabase.com>
Subject: Re: ADSExecuteSQLDirect and locking a table
Date: Tue, 26 Sep 2006 08:55:25 -0600
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
NNTP-Posting-Host: 10.24.38.228
Message-ID: <45193e6f@solutions.advantagedatabase.com>
X-Trace: 26 Sep 2006 08:51:27 -0700, 10.24.38.228
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.38.228
Xref: solutions.advantagedatabase.com Advantage.Visual_Basic:1109
Article PK: 1137902

Hi Paulo,

I do not think there is currently a way to lock a table via SQL. It would
be necessary to use the ACE APIs directly to do the updates (AdsOpenTable,
AdsLockTable, AdsSet*, etc.). Another possibility might be to use
transactions. This does not prevent others from using the table, but
depending on your goals/requirements, it might accomplish what is necessary.

I added to our customer suggestion list the ability to lock a table through
SQL. A few people have asked for variations of this type of capability.

Mark Wilkins
Advantage R&D

"Paulo" <projectolda (NO SPAM) @sapo.pt> wrote in message
news:4518066b@solutions.advantagedatabase.com...
> Hi all,
>
> I need to do an UPDATE on a table but want to ensure the table is not
> being used.
> But, if I open and lock it, the ADSExecuteSQLDirect doesn?t work. It says
> the table is being used.
> Is there another way to do this?
>
> B.R.,
> Paulo
>
>
>
>