Results 1 to 2 of 2

Thread: Accessing a read-only database

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 1999
    Location
    Genova- Italy
    Posts
    4

    Post

    This is the second message, related to the same subject, that I have rewritten to me more clear.
    Using VB6 and a data control:
    I need to read a database which may be or not password protected and may be written in Access 2 or Access 97.
    This code works fine:
    Private Sub Form_Load()
    Data1.Connect = ";UID=Admin;PWD=SERARES"
    Dim dbs As Database
    Set dbs = OpenDatabase("C:\venezia1\venezia1.mdb", False, False, "MS Access;PWD=SERARES")
    Data1.DatabaseName = "c:\venezia1\venezia1.mdb"
    Data1.RecordSource = "schede"
    Data1.Refresh
    End Sub

    but if, and this is the case, the database to be accessed is on a CD and is of course
    READ ONLY I get an error message saying that the database is already exclusively opened by another user or I have not the authorisation to open the file.

    How can I resolve this problem?
    Please give me some tips.


    ------------------

  2. #2
    Lively Member
    Join Date
    Jun 1999
    Location
    Raleigh, NC
    Posts
    70

    Post

    Not sure about this, but since opening an .mdb file causes you to create or use an .ldb file, it may be trying to create that file on the CD (which would be a problem). Is it possible to specify the location of the .ldb file other than in the location of the .mdb? That might do the trick.
    Bash

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