Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    encrypt a database through code (Access 2000)

    encrypt a database through code
    Ihave a function that creates a database.It is the following:

    Function Depot(tName As String)
    '*******************************************
    'Name: ANewDB (Function)
    'Inputs: Directory and name of database. In the OnClick event of the Control
    ' on a form write : Call ANewDB("c:BEDepot.mdb")
    '*******************************************
    Dim wsp As Workspace, db As Database
    Dim db2 As Database
    Set db = CurrentDb
    Set wsp = DBEngine.Workspaces(0)
    Set db2 = wsp.CreateDatabase(tName, dbLangGeneral)
    db2.Close
    End Function


    Is to possible to encrypt it through code so that the person who opens it later on cannot read it without some password? And also how can i decrypt it ? The reason is that this function creates a database in other computers and the users then send it to me.But i do not want the customers to look at or tamper with the data.I will be extremely grateful for any advice

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: encrypt a database through code (Access 2000)

    Just use :
    Set db2 = wsp.CreateDatabase(tName, dbLangGeneral, dbEncrypt)
    Francois

  3. #3
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: encrypt a database through code (Access 2000)

    it is really great! Thank you so much

Posting Permissions

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