Anywhere does SELECT FOR UPDATE? 
Author Message
 Anywhere does SELECT FOR UPDATE?

Hi,

is there a SELECT FOR UPDATE statement in SQL Anywhere to select AND lock
all result set rows?

I want to make sure that nobody will be able to SELECT (or at least SELECT
FOR UPDATE) rows which I SELECT FOR UPDATE. Possible Y/N?

Thnx...

--
-- Chris, The Blast I



Tue, 19 Sep 2000 03:00:00 GMT
 Anywhere does SELECT FOR UPDATE?

If you execute a select for update with a cursor, you're automatically given
an update lock, which means that other users could query your rows, but could
not update them.

If you execute a generic select statement, you can add the HOLDLOCK keyword
to maintain the shared locks until the completion of the transaction (which
means other users could read but not update).

Does this help?

Stan McFarland
RABA Technologies

--------------------------------

Quote:

> Hi,

> is there a SELECT FOR UPDATE statement in SQL Anywhere to select AND lock
> all result set rows?

> I want to make sure that nobody will be able to SELECT (or at least SELECT
> FOR UPDATE) rows which I SELECT FOR UPDATE. Possible Y/N?

> Thnx...

> --
> -- Chris, The Blast I

--
Stan McFarland
RABA Technologies



Tue, 19 Sep 2000 03:00:00 GMT
 Anywhere does SELECT FOR UPDATE?

If you execute a select for update with a cursor, you're automatically given
an update lock, which means that other users could query your rows, but could
not update them.

If you execute a generic select statement, you can add the HOLDLOCK keyword
to maintain the shared locks until the completion of the transaction (which
means other users could read but not update).

Does this help?

Stan McFarland
RABA Technologies

--------------------------------

Quote:

> Hi,

> is there a SELECT FOR UPDATE statement in SQL Anywhere to select AND lock
> all result set rows?

> I want to make sure that nobody will be able to SELECT (or at least SELECT
> FOR UPDATE) rows which I SELECT FOR UPDATE. Possible Y/N?

> Thnx...

> --
> -- Chris, The Blast I

--
Stan McFarland
RABA Technologies



Tue, 19 Sep 2000 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. doing SELECT after INSERT OR UPDATES in stored proc causes proble ms

2. 2-way replication Update Anywhere, Update trigger

3. Using TOP in a Select done with ODBC through MFC RecordSet class

4. preserving case when doing selects/compares in stored procedure

5. Doing Select from Excel File

6. can this SELECT be done?

7. Problems doing selects accross Linked Servers - Help Required Urgently

8. Performance question when doing SELECT DISTINCT

9. How is this SELECT done?

10. X lock when doing select

11. Suppressing Column Headings when doing a select * from ...


 
Powered by phpBB® Forum Software