Results 1 to 3 of 3

Thread: Recordset Locks

  1. #1
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    46

    Unanswered: 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

  2. #2
    Join Date
    Sep 2003
    Posts
    2

  3. #3
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •