Click here to Skip to main content
15,905,071 members
Home / Discussions / Database
   

Database

 
QuestionEnterprise Library - Data Access layer Pin
devvvy27-May-06 22:36
devvvy27-May-06 22:36 
QuestionInserting a New Record in MSAccess Pin
ADY00727-May-06 12:02
ADY00727-May-06 12:02 
Questiongrouped Pin
Amarni27-May-06 1:50
Amarni27-May-06 1:50 
AnswerRe: grouped Pin
Colin Angus Mackay27-May-06 2:22
Colin Angus Mackay27-May-06 2:22 
Questionneed help in ADO VC++ Pin
GANsJob26-May-06 18:56
GANsJob26-May-06 18:56 
QuestionSQL Server Cursor - Quick Question Pin
Jawz-X26-May-06 10:12
Jawz-X26-May-06 10:12 
GeneralRe: SQL Server Cursor - Quick Question Pin
Jawz-X26-May-06 10:18
Jawz-X26-May-06 10:18 
AnswerRe: SQL Server Cursor - Quick Question Pin
Eric Dahlvang26-May-06 11:12
Eric Dahlvang26-May-06 11:12 
Jawz-X wrote:
I want to create a cursor to select and iterate through each client in the database. Obviously, that will lock the “clients” table.

It will not obviously lock the clients table.


SQL Server Books Online:
Cursor Transaction Isolation Levels
The transaction locking behavior of a specific cursor is determined by combining the locking behaviors of the cursor concurrency setting, any locking hints specified in the cursor SELECT, and transaction isolation level options.

Microsoft® SQL Server™ 2000 supports these cursor transaction isolation levels:

Read Committed
SQL Server acquires a share lock while reading a row into a cursor but frees the lock immediately after reading the row. Because shared lock requests are blocked by an exclusive lock, a cursor is prevented from reading a row that another task has updated but not yet committed. Read committed is the default isolation level setting for both SQL Server and ODBC.

Read Uncommitted
SQL Server requests no locks while reading a row into a cursor and honors no exclusive locks. Cursors can be populated with values that have already been updated but not yet committed. The user is bypassing all of the locking transaction control mechanisms in SQL Server.

Repeatable Read or Serializable
SQL Server requests a shared lock on each row as it is read into the cursor as in READ COMMITTED, but if the cursor is opened within a transaction, the shared locks are held until the end of the transaction instead of being freed after the row is read. This has the same effect as specifying HOLDLOCK on a SELECT statement.


----------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters

QuestionRe: SQL Server Cursor - Quick Question Pin
Jawz-X26-May-06 11:53
Jawz-X26-May-06 11:53 
AnswerRe: SQL Server Cursor - Quick Question Pin
Colin Angus Mackay26-May-06 21:20
Colin Angus Mackay26-May-06 21:20 
Questionproblem with sql server Pin
lucky123456026-May-06 9:12
lucky123456026-May-06 9:12 
AnswerRe: problem with sql server Pin
Colin Angus Mackay26-May-06 11:31
Colin Angus Mackay26-May-06 11:31 
QuestionSQL - SELECT Question Pin
ensger26-May-06 7:23
ensger26-May-06 7:23 
AnswerRe: SQL - SELECT Question Pin
Kschuler26-May-06 9:30
Kschuler26-May-06 9:30 
GeneralRe: SQL - SELECT Question Pin
ensger26-May-06 18:02
ensger26-May-06 18:02 
GeneralFound it - thanks Pin
ensger27-May-06 1:01
ensger27-May-06 1:01 
QuestionGet XML node as 'text' data type Pin
Jim Conigliaro25-May-06 8:53
Jim Conigliaro25-May-06 8:53 
AnswerRe: Get XML node as 'text' data type Pin
Arjan Einbu25-May-06 12:49
Arjan Einbu25-May-06 12:49 
QuestionBest Practices for including a SQL DB as part of your apps Pin
gantww25-May-06 8:24
gantww25-May-06 8:24 
AnswerRe: Best Practices for including a SQL DB as part of your apps Pin
Rob Graham25-May-06 11:10
Rob Graham25-May-06 11:10 
QuestionSQL server 2005 express ed Pin
Paps225-May-06 7:54
Paps225-May-06 7:54 
QuestionLogin system help? Pin
eric_tran25-May-06 5:34
eric_tran25-May-06 5:34 
AnswerRe: Login system help? Pin
Colin Angus Mackay25-May-06 10:31
Colin Angus Mackay25-May-06 10:31 
QuestionProblems with MSDE & Networking Pin
nathan2240525-May-06 4:46
nathan2240525-May-06 4:46 
AnswerRe: Problems with MSDE & Networking Pin
woudwijk25-May-06 11:09
woudwijk25-May-06 11:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.