Results 1 to 3 of 3

Thread: Read-only

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2001
    Posts
    27

    Read-only

    How do you check if an access database is read-only?

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Oct 2001
    Posts
    27
    I also want to add on: how do you know if an access DB is located on a drive on the network that is read-only to some users? Thanks.

  3. #3
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    u could test for error when trying to open the db

    VB Code:
    1. Private Sub Command4_Click()
    2.     Dim db As Database
    3.     On Error GoTo xit
    4.     Set db = OpenDatabase("C:\data\vbworld\_TestData\demodbr.mdb")
    5.     '.
    6.     '.
    7.     '.
    8.    
    9. xit:
    10.     If Err.Number = 3051 Then
    11.         'Read only
    12.         MsgBox "Database is read only"
    13.     Else
    14.         MsgBox Err.Number & " " & Err.Description
    15.     End If
    16. End Sub
    -= a peet post =-

Posting Permissions

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



Click Here to Expand Forum to Full Width