Click here to Skip to main content
15,923,273 members
Home / Discussions / Database
   

Database

 
AnswerRe: SqlDataAdapter question.. What.... Pin
Luis Alonso Ramos2-Sep-05 17:26
Luis Alonso Ramos2-Sep-05 17:26 
GeneralRe: SqlDataAdapter question.. What.... Pin
Besinci3-Sep-05 2:06
Besinci3-Sep-05 2:06 
GeneralRe: SqlDataAdapter question.. What.... Pin
Luis Alonso Ramos3-Sep-05 6:28
Luis Alonso Ramos3-Sep-05 6:28 
QuestionDatabinding Problem In My UserControl Pin
User 20930732-Sep-05 2:39
User 20930732-Sep-05 2:39 
QuestionI want to add,delete,save my project ... Pin
mostafa_h1-Sep-05 23:07
mostafa_h1-Sep-05 23:07 
QuestionHow will I know that DSN is not pointing to any database? Pin
PrashantJ1-Sep-05 21:17
PrashantJ1-Sep-05 21:17 
AnswerRe: How will I know that DSN is not pointing to any database? Pin
Michael Potter2-Sep-05 5:25
Michael Potter2-Sep-05 5:25 
QuestionData Isolation and Transaction Isolation Pin
devvvy1-Sep-05 17:37
devvvy1-Sep-05 17:37 
Hey guys,

QUESTION 1: Is this correct?

I. Transaction Isolation Level Serializable = Pessimistic Locking

For example:
trx = conn.BeginTransaction(IsolationLevel.Serializable)

ie. When two threads try to access the same record..
1.  Thread 1 begins tran and select [record 123] (I presume a X-lock *Exclusive lock* is acquired)<br />
2.  Thread 2 begins tran and *attemp* to select [record 123] (but must wait before select comes thru because Transaction Isolation is set to Serializable -- ie. pessimistic -- I presume Thread 2 is also trying to acquire X-lock at this time but need to wait)<br />
3. Thread 1 commit updates on [record 123]<br />
4. Thread 2 select on [record 123] comes thru <br />
5. Thread 2 update<br />
6. Thread 2 commits update<br />


II. Transaction Isolation Level = ??? For optimistic locking?

<br />
   1.  Thread 1 begins tran and select [record 123] (I presume a S-lock *shared lock* is acquired)<br />
   2.  Thread 2 begins tran and select [record 123] and it comes thru (Thread 2 also acquire a S-lock at this point)<br />
   3. Thread 1 commit updates on [record 123 \ file updated: firstname] (Thread 1 acquired a U-lock *update lock* at this point)<br />
   4. Thread 2 commit updates on [record 123 \ file updated: lastname] (CAUTION: firstname commited by Thread 1 overwritten by Thread 2 at this time) (Thread 2 acquired a U-lock *update lock* at this point)<br />


Is this correct?

QUESTION 2:
With cursor you get to specified locking, for example:
<br />
    Dim objRs As ADODB.Recordset<br />
    Set objRs = New ADODB.Recordset<br />
<br />
    Or Dim Objrs As New Adodb.Recordset<br />
<br />
    objRs.Open "users", objConn, adOpenKeyset, adLockOptimistic, adCmdTable


But how with ... "System.Data.IDbConnection"?

Thanks in advance.

-- modified at 23:37 Thursday 1st September, 2005
AnswerRe: Data Isolation and Transaction Isolation Pin
airbus3801-Sep-05 22:14
airbus3801-Sep-05 22:14 
GeneralRe: Data Isolation and Transaction Isolation Pin
devvvy1-Sep-05 22:21
devvvy1-Sep-05 22:21 
GeneralRe: Data Isolation and Transaction Isolation Pin
airbus3802-Sep-05 0:42
airbus3802-Sep-05 0:42 
General"Data Isolation" Vs "Locking" Pin
devvvy3-Sep-05 21:33
devvvy3-Sep-05 21:33 
QuestionHOW I KNOW WHAT TABLES ARE IN A DATA BASE IN CSHARP Pin
alonso2k811-Sep-05 10:40
alonso2k811-Sep-05 10:40 
AnswerRe: HOW I KNOW WHAT TABLES ARE IN A DATA BASE IN CSHARP Pin
Michael P Butler1-Sep-05 11:21
Michael P Butler1-Sep-05 11:21 
AnswerRe: HOW I KNOW WHAT TABLES ARE IN A DATA BASE IN CSHARP Pin
Duncan Edwards Jones1-Sep-05 12:10
professionalDuncan Edwards Jones1-Sep-05 12:10 
AnswerRe: HOW I KNOW WHAT TABLES ARE IN A DATA BASE IN CSHARP Pin
Christian Graus1-Sep-05 15:30
protectorChristian Graus1-Sep-05 15:30 
AnswerRe: HOW I KNOW WHAT TABLES ARE IN A DATA BASE IN CSHARP Pin
miah alom2-Sep-05 4:59
miah alom2-Sep-05 4:59 
GeneralRe: HOW I KNOW WHAT TABLES ARE IN A DATA BASE IN CSHARP Pin
miah alom2-Sep-05 5:23
miah alom2-Sep-05 5:23 
Questiongroup by and concat dependent rows Pin
HELP_ME!!1-Sep-05 2:22
sussHELP_ME!!1-Sep-05 2:22 
AnswerRe: group by and concat dependent rows Pin
airbus3801-Sep-05 3:03
airbus3801-Sep-05 3:03 
QuestionMDF files Pin
cberam1-Sep-05 1:23
cberam1-Sep-05 1:23 
AnswerRe: MDF files Pin
airbus3801-Sep-05 2:20
airbus3801-Sep-05 2:20 
Questiontriggers? Pin
Soviet31-Aug-05 23:35
Soviet31-Aug-05 23:35 
AnswerRe: triggers? Pin
Anonymous1-Sep-05 11:23
Anonymous1-Sep-05 11:23 
AnswerRe: triggers? Pin
jonathan151-Sep-05 22:54
jonathan151-Sep-05 22:54 

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.