Results 1 to 2 of 2

Thread: Password in MSAccess with VB

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 1999
    Location
    Karachi, Sind, Pakistan
    Posts
    20

    Post

    I wanna add security in my Access database which I use with VB, while opening the database, how would I tell the password to VB/Access; Somebody told me to add it in Opendatabase parameters but I could not resolve the problem, Can you help me???

  2. #2
    Member
    Join Date
    Apr 1999
    Location
    Kirkland, WA, USA
    Posts
    40

    Post

    it is in the OpenDatabase, as follows:

    Assume: you have a Jet database ("MyJetDB.mdb") in your application location

    Assume: your database password is "Fred$" (no quotes)

    To open the database, you would:

    Private Sub ButOpenDB_Click()

    dim dbCurrent as database
    set dbCurrent = Workspaces(0).OpenDatabase(app.path & "\MyJetDB.mdb", false, false, ";pwd=Fred$")

    End sub


    ------------------
    http://www.smithvoice.com/vbfun.htm

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