Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2008
    Posts
    2

    Unanswered: Two computers updating sql dbase

    Please help.

    I have a VB application using sql dbase. The application is installed in two computers. I am having problems when the 2nd computer is updating the dbase and/or both computer accessing the dbase. Do i need to lock the sql dbase? Please help on how to do this.

    Currently, I have this..
    Form_Load()
    Set adoCOnnection = New ADODB.Connection
    Set adors = New ADODB.Recordset
    connectstring = "Provider=SQLOLEDB.1......."
    adoCOnnection.Open connectstring


    cmdSave_Click()

    adors.CursorType = adOpenDynamic
    adors.CursorLocation = adUseClient
    adors.LockType = adLockOptimistic
    adors.open "SELECT * FROM.....", adoCOnnection
    Dim query as String
    query = "INSERT INTO .......... VALUES...."
    adoConnection.Excute query
    adors.Close

    Any help is greatly appreciated. Thank you

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    I would use a read-only locking for the SELECT, since you're building separate insert statements.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

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