Securing a Database for Distribution

When a database is used only in one office or on a local area network (LAN) or wide area network (WAN), you have considerable control over who has access to it. But if you send the database out into the world—on its own or as part of a larger application—you lose that control. There is no way you can know who is using it or what tools they might have available to hack into it. If thinking about this keeps you awake at night, you should distribute your database as a Microsoft Database Executable (MDE) file.

Suppose the owners of The Garden Company want to make a database available for use by gardening clubs in the area, but they don’t want people to be able to change its objects and perhaps "break" things. Saving a database as an MDE file compiles all modules, removes all editable source code, and compacts the destination database. Users of the MDE file can view forms and reports and update information, as well as run queries, macros, and VBA code. They cannot do the following:

  • View, edit, or create forms, reports, or modules in Design view.

  • Add, delete, or change references to other objects or databases.

  • Change VBA code.

  • Import or export forms, reports, or modules.

Access can save a database as an MDE file only if it is in Access 2002 format. Although Access 2000 is the default format for databases created with Access 2002 and Access 2003, Access can’t save an Access 2000 database as MDE: you first have to convert it to 2002 format.

In this exercise, you will convert the GardenCo database to Access 2002 format, and then secure it by saving it as a distributable MDE file. Although The Garden Company probably wouldn’t distribute their main database to garden clubs even as an MDE file, we will use that database for this exercise. You start this exercise with the GardenCo database closed.

USE the GardenCo database in the practice file folder for this topic. This practice file is located in the My DocumentsMicrosoft PressAccess 2003 SBSSecureMDE folder and can also be accessed by clicking Start/All Programs/Microsoft Press/Access 2003 Step by Step.

  1. Start Access.

    Important

    If you are working in a multi-user environment, first make sure that all other users close the database for which you want to create an MDE file.

  2. On the Tools menu, point to Database Utilities, point to Convert Database, and click To Access 2002 – 2003 File Format.

  3. In the Database to Convert From dialog box, navigate to the My DocumentsMicrosoft PressAccess 2003 SBSSecureMDE folder, and double-click GardenCo.

  4. In the File name box, type GardenCo_New, and click Save.

  5. Click OK.

    A database you can secure as an MDE file is created.

    Important

    You cannot convert a database back from the MDE format, so before you save a database as an MDE file, create a backup copy. If you need to make changes to forms, reports, or VBA code, you will have to make them in the original database and then save it as MDE again.

  6. On the Tools menu, point to Database Utilities, and click Make MDE File.

  7. In the Database To Save As MDE dialog box, navigate to the My DocumentsMicrosoft PressAccess 2003 SBSSecureMDE folder, click GardenCo_New, click Make MDE, and then acknowledge the safety warning, if necessary.

  8. In the File name box, type TGC, and click Save.

    The process only takes a moment; no message alerts you when it is completed.

  9. Click the Open button, navigate to the practice file folder, double-click TGC, and acknowledge the safety warning, if necessary.

    Important
  10. Click each of the object types on the Objects bar while watching the Design button at the top of the database window.

    The Design button is available for tables, queries, and macros, but unavailable for all other object types.

    Tip

    If you intend to distribute your database for installation on systems where the setup is unknown, you should look into the Package and Deployment Wizard in Microsoft Office XP Developer.

CLOSE the GardenCo database.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.228.178