Article View: borland.public.jbuilder.database
Article #357Re: MS SQLServer "FOR UPDATE"
From: John Moore (TeamB)
Date: Thu, 26 Oct 2006 20:41
Date: Thu, 26 Oct 2006 20:41
39 lines
2168 bytes
2168 bytes
Magnus
Sorry, but I have not tried anything like that recently.. Remember these
forums are primarily for the support of DataExpress, therefore more
general JDBC/Driver support issues should be posted to the specific JDBC
vendor's support forums.. (for the best answers..)
John..
wrote:
> Hi,
>
> I use the below stmt to do a "lock" on the table.
> It works great on JDS and MySQL but I get the following error on MS SQL
> Server 2000:
>
> e:com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR UPDATE
> clause allowed only for DECLARE CURSOR.
>
> Can anyone point me in the right direction here?
>
> TIA
>
>
> ---
> rs = stmt.executeQuery("select path from location " +
> "where compid = \'" + compId + "\' " +
> "and location = \'" + location + "\' " +
> "FOR UPDATE ");
--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
http://www.microps.com/mps/paperFAQ.html
====================================================
Technical Details
Message-ID:
<45411d91$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<453fb594$3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1073da,b07ba128b612bb4e X-Google-Attributes: gid1073da,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 26 Oct 2006 13:41:54 -0700 From: "John Moore (TeamB)" <jbm@microps.com> User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.database Subject: Re: MS SQLServer "FOR UPDATE" References: <453fb594$3@newsgroups.borland.com> In-Reply-To: <453fb594$3@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 207.137.13.178 Message-ID: <45411d91$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1161895313 207.137.13.178 (26 Oct 2006 13:41:53 -0700) Lines: 39 Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail