Results 1 to 14 of 14
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    share the same mdb... (2000 sr-1)

    I have a ndb on a server dir and have a vbp project to write value in recordset.
    I distribute the same vb project to 2 user (whit the same connection on same mdb, same table, same recset... ecc)...
    If i start the same project simuotanius on of this vb code go in error in :
    the line .Update, possible solve this error?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: share the same mdb... (2000 sr-1)

    It's not a good idea to have multiple users updating the same records at the same time. You could try using adLockPessimistic as LockType when opening the recordset.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: share the same mdb... (2000 sr-1)

    Hi Hans...
    Dont remeber the correct syntiax to set the param...
    Here is the recordset for update:

    Set DB1 = DBEngine.OpenDatabase("GCD01F4500DATIPUBBLICAAPPLI CAZIONIANAGRAFICA.mdb")
    Set RSD1 = DB1.OpenRecordset("ANAGRAFICA1")

    Attached my piece of code:

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: share the same mdb... (2000 sr-1)

    You've been using ADO all the time. Why are you using DAO now?

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: share the same mdb... (2000 sr-1)

    problem with driver....

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: share the same mdb... (2000 sr-1)

    Try

    Set RSD1 = DB1.OpenRecordset("ANAGRAFICA1", dbOpenDynaset, dbDenyWrite)

    While one user is updating records, another user shouldn't be able to edit records in the same table.

  7. #7
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: share the same mdb... (2000 sr-1)

    1) But i insert this line of code in each vb code distibute?
    2) in other acse go in error in RSD1.Index = "COPE" "operation not supported" nr. 3251

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: share the same mdb... (2000 sr-1)

    1) I'd try it first to see if it works correctly, before applying the change elsewhere.
    2) Try using dbOpenTable instead of dbOpenDynaset

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: share the same mdb... (2000 sr-1)

    Sal, you should know by now how to create a link in a post. See <!help=19>Help 19<!/help>.

  10. #10
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: share the same mdb... (2000 sr-1)

    2) dbOpenTable have error 3262 "actually opened from ...."

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: share the same mdb... (2000 sr-1)

    Make sure that nobody (you included) is using the table. You may need to close and reopen your application.

  12. #12
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: share the same mdb... (2000 sr-1)

    Hans have see in ms this peraph help me?:
    http://support.microsoft.com/kb/191253/it

  13. #13
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: share the same mdb... (2000 sr-1)

    I don't think this MSKB article will help you.

  14. #14
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: share the same mdb... (2000 sr-1)

    Have error:"3262 impossible to lock table Actually used from..."

    note:
    Solved with your new proprerty "dbOpenTable, dbDenyWrite" the error in RSD1.Index = "COPE"

Posting Permissions

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