If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Recordset Locks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-23-03, 22:09
aljubicic aljubicic is offline
Registered User
 
Join Date: Jan 2003
Location: Australia
Posts: 46
Recordset Locks

Hi All,

I just have a question about recordsets. I am using ADO control to connect to my Database.

adoConnF1.ConnectionString = "Driver={SQL Server}; " & _
"Server=FINANCIAL; " & _
"Database=finprod; " & _
"UID=sa; " & _
"PWD="

And I am using the following syntax to create a recordset..

Dim SalutationsRs as New ADODB.Recordset

strTitles = "SELECT * FROM SALUTATIONS"
SalutationsRs.Open strTitles, adoConnNAR, adOpenKeyset, adLockPessimistic, adCmdText


What I want to know is the settings for the lockedit and what each of the values do. I have here adLockPessimistic but I am not sure how that will affect others in a multi user environment.

And also what the other possible settings mean like dbLockOptimistic?

Could any provide myself with some insight or documentation on this?

Thanks
Anthony
Reply With Quote
  #2 (permalink)  
Old 09-24-03, 09:27
PJIgoe PJIgoe is offline
Registered User
 
Join Date: Sep 2003
Posts: 2
ADO Lock types

Reply With Quote
  #3 (permalink)  
Old 09-25-03, 07:05
bugs bugs is offline
Registered User
 
Join Date: Sep 2003
Posts: 2
adLockReadOnly Default. Read-only—you cannot alter the data.

adLockPessimistic Pessimistic locking, record by record—the provider does what is necessary to ensure successful editing of the records, usually by locking records at the data source immediately upon editing.

adLockOptimistic Optimistic locking, record by record—the provider uses optimistic locking, locking records only when you call the Update method.

adLockBatchOptimistic Optimistic batch updates—required for batch update mode as opposed to immediate update mode.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On