Monday, February 5, 2018

Deploy an Access 2007 application

Deploy an Access 2007 application

Microsoft Office Access 2007 provides a feature-rich platform for developing database applications. A database application is a computer program that provides both a way to store and manage data and a user interface that follows the logic of business tasks (application logic).

To deploy Office Access 2007 applications that can run without an installation of Access 2007 on a user's computer, you can distribute them along with the Access 2007 Runtime, which is available for free from the Microsoft.com Download Center.

This article discusses basic deployment planning, the features of the Access 2007 Runtime, and how to download the Runtime. This article also provides an overview of deploying database applications by using Access 2007. For more information about planning, designing, and deploying an Access 2007 application, search the MSDN Web site and the Technet Web site, and see the links in the See Also section of this article.

What do you want to do?

Plan for deployment

Understand the Access 2007 Runtime

Download the Access 2007 Runtime

Deploy an Access 2007 application

Plan for deployment

Before you begin, you should ask yourself the following questions about the way that the application will be deployed.

Should the data and the logic be separated?

You can create an Access 2007 application that combines data management and application logic in one file. This is the default application structure in Access 2007. Combining data management and application logic in one file provides the simplest deployment method, but this method works best if only one person uses the application at a time, and it involves some risk. For example, a user could cause data loss by unintentionally deleting or damaging the application file.

In most cases, you should separate data management and application logic. This helps improve:

  • Security    Using a server for data storage can help keep data secure.

  • Performance    Using a split database or a database server can help reduce network traffic.

  • Customizability    New macro actions for the Navigation Pane can help you control who sees what. You can distribute different application logic files to different users.

  • Portability    The Work Offline and Synchronize commands can help users who are not in the office.

Ways to separate data and logic

One way to separate data and logic is by using the Access Database command (on the Database Tools tab, in the Database Tools group). The Access Database command splits your database application into two Access files: one for data and one for logic. When you use the Access Database command, Access creates a file with "_be" (meaning "back-end") appended to the file name — for example, if the original database file name is "Database1.accdb," Access creates a new database file named "Database1_be.accdb."

Another way to separate data management and application logic is by using a database server program (such as Microsoft SQL Server) for data management, and Access for application logic.

To decide whether a single Access file is sufficient for both data management and application logic, consider the following:

  • Data integrity and security    Access 2007 users must have read/write permissions for the file that contains the application logic. If you combine data and logic in one file, the data is exposed to the same risks as the application logic.

    An Access 2007 application that uses separate logic and data files can help protect data integrity and security by leveraging NTFS security features. Because users need explicit read/write access only to the application logic file, the data file can be made more secure.

    Your application may require further security options, such as the ability to control which users have access to particular data. In this case, you should use a server product such as SQL Server or a Windows server operating system featuring Windows SharePoint Services to store and manage your application data, and use Access to provide the application logic.

  • Scalability    An Access 2007 file can have a maximum size of 2 gigabytes (GB). Although 2GB is a substantial amount of text data, it may be insufficient for some applications, particularly applications that store attachments in database records. If you separate the data and the logic, your application can accommodate more data. If you expect that users will store a large volume of data, you might consider using more than one Access 2007 data file.

    You should also review the Access 2007 program specifications for other scalability information. Find links to more information about Access 2007 specifications in the See Also section.

  • Network capacity    If multiple users will need to use the application at the same time over a network, data corruption is more likely to occur if the data and logic are combined in one file. Moreover, if you combine the data and the logic in one Access file, you cannot optimize the network traffic that Access generates. If multiple users will simultaneously use your application over a network, you should separate the data and the logic, either by using two or more Access files, or by using a database server product for data and Access for application logic.

What will the network environment be like?

If your users are all on the same local area network, or if your application is not used over a network, a single application file can perform well in most circumstances.

Network performance will be better if you separate the data and the logic. If your users will not be on the same local area network, use a server to store and manage your data, and use Access for application logic.

Will users have Access 2007?

If all of your users will have Access 2007 installed on their computers, they can open and use the application as they would any Access 2007 database file.

If some or all of your users will not have Access 2007 installed on their computers, you will need to deploy the Access 2007 Runtime software to those users when you deploy your application.

Top of Page

Understand the Access 2007 Runtime

The Access 2007 Runtime is a redistributable program that allows people who do not have Access 2007 installed on their computers to use Access 2007 database applications. When you open an Access 2007 database by using the Access 2007 Runtime, the database opens in runtime mode.

What is runtime mode?

Runtime mode is an Access 2007 operating mode in which certain Access 2007 features are not available by default. Some of these unavailable features can be made available in runtime mode, however.

Which features are not available in runtime mode?

The following Access 2007 features are not available in runtime mode:

  • Navigation Pane    The Navigation Pane is not available in runtime mode. This helps prevent users from accessing arbitrary objects in your database application. Only those objects that you expose to users — for example, by providing a switchboard form — can be opened while using runtime mode. You cannot make the Navigation Pane available in runtime mode.

  • The Ribbon    By default, the Ribbon is not available in runtime mode. This helps prevent users from creating or modifying database objects, and from performing other potentially harmful actions, such as connecting to new data sources or exporting data in ways that you do not intend. You can create a custom Ribbon, and then associate that Ribbon with a form or report. You cannot expose the default Ribbon tabs in runtime mode.

  • Design view and Layout view    Design view and Layout view are not available for any database objects in runtime mode. This helps prevent users from modifying the design of objects in your database application. You cannot enable Design view or Layout view in runtime mode.

  • Help    By default, integrated Help is not available in runtime mode. Because you control what functionality is available in your runtime mode application, some of the standard integrated Access 2007 Help may be irrelevant to people who use your application, and could potentially confuse or frustrate them. If you are using the Access 2007 Developer Extensions to package and deploy your database application, you can provide a custom Help file with your runtime mode application.

Can I open an Access 2007 database in runtime mode without using the Access 2007 Runtime software?

You can run any Access 2007 database in runtime mode on a computer that has the full version of Access 2007 installed. To run an Access 2007 database in runtime mode, do one of the following:

  • Change the file name extension of the database file from .accdb to .accdr.

  • Create a shortcut to the database, and include the /Runtime command-line switch in the shortcut.

Does runtime mode make my database more secure?

Although runtime mode limits the availability of navigation and design features, you should not use runtime mode as the primary means of securing a database application. On a computer that has the full version of Access 2007 installed, it may be possible for a user to open a runtime database application as a regular database application (that is, with all features available) and then to change the design or perform other unwanted actions.

Even if you deploy your database application only on computers that do not have the full version of Access 2007 installed, it is still possible for a user to transfer the application to a computer that does have the full version of Access 2007 installed, and then open the runtime database application as a regular database application.

Note: If you want to distribute an Access 2007 application so that users cannot modify the design of forms, reports, or Microsoft Visual Basic for Applications (VBA) modules, consider using a compiled binary file (.accde). For more information about using a compiled binary file, see the section Decide which file format to use, later in this article.

Top of Page

Download the Access 2007 Runtime

To download the Access 2007 Runtime from the Microsoft Download Center, click the link in the See Also section.

No purchase is necessary to download, use, or redistribute the Access 2007 Runtime, and there is no limit on the number of users to whom you can distribute the Runtime.

Top of Page

Deploy an Access 2007 application

To deploy an Access 2007 application, at a minimum you need to do the following tasks:

  1. Create the application    Your application should provide a way for users to open and use database objects. If your application does not provide such means, your users will need Access 2007 installed on their computers to use the application. Moreover, you will not be able to predict how users will navigate within your application, and it will be more difficult for you to provide complete application documentation. Furthermore, if users open your application by using the Access 2007 Runtime software, the built-in Access 2007 navigation features will be unavailable.

    One approach is to create a form that has command buttons that open database objects or perform other actions, and then specify that form as the default form to open when the application starts.

    Note: For Help on creating a form, see the topic, Create a form by using the Form tool.

    How do I specify the default form to open?

    1. Click the Microsoft Office Button Office button image , and then click Access Options.

    2. In the left pane of the Access Options dialog box, click Current Database.

    3. In the right pane, under Application Options, select the default form that you want by using the Display Form combo box.

    You can also create a custom Ribbon, and then associate that Ribbon with a form that opens when your application starts. For more information about creating a custom Ribbon, see the links in the See Also section.

  2. Install the application    There are several options and considerations for installing an application. You may want to deploy a particular file format to better control how users will use the application. Alternatively, you could package the application to make it easier to install, or deploy separate data and logic components.

    You can find more information about these options and considerations in the following sections.

Decide which file format to use

There are four Access 2007 file formats that you can use when you deploy an application:

  • .accdb    This is the default file format for Access 2007. When you deploy an application in this format, users have the most options to customize and navigate the application in whatever way they choose. If you want to ensure that users do not change the design of your application, you should use the .accde file format. In addition, a user cannot easily determine whether an .accdb file has been changed after you packaged it — to make this obvious, use the .accdc file format.

  • .accdc    This format is also known as an Access Deployment file. An Access Deployment file comprises an application file and a digital signature that is associated with that file. This file format assures users that no one has changed the application file after you packaged it. You can apply this format to a default format Access 2007 file (.accdb), or to an Access 2007 compiled binary file (.accde).

    You can put only one application file in an Access Deployment file. If your application has separate data and logic files, you can package them separately.

    For more information about using an Access Deployment file, see the section Package and sign an Access 2007 database.

  • .accde    This format is also known as a compiled binary file. In Access 2007, a compiled binary file is a database application file that has been saved with all of the VBA code compiled. No VBA source code remains in an Access compiled binary file.

    You can use the Access 2007 Runtime to open an Access 2007 compiled binary file. However, by default, the Runtime does not recognize the .accde file name extension. To open a compiled binary file by using the Access 2007 Runtime, create a shortcut that points to the Runtime, and include the path to the compiled binary file that you want the shortcut to open.

    Important: If you create a compiled binary file by using Access 2007 with Service Pack 1 installed, users cannot open the compiled binary file by using the full version of Access 2007 without Service Pack 1 installed. To resolve this issue, users should install Service Pack 1.

    How do I save an Access 2007 file as a compiled binary file?

    1. In Access 2007, open the database (.accdb file) that you want to save as a compiled binary file (.accde).

    2. On the Database Tools tab, in the Database Tools group, click Make ACCDE. Button image

    3. In the Save As dialog box, browse to the folder in which you want to save the file, type a name for the file in the File Name box, and then click Save.

  • .accdr    This format enables you to deploy an application that opens in runtime mode. Deploying a runtime application can help you control the way that it is used, although it is not a means of securing an application. For more information about runtime mode, see the section Understand the Access 2007 Runtime.

Package and install an application

The simplest way to install an application is to provide the database application file to the application users. However, if you plan to deploy an application to a large audience, or to deploy an application more than once, you should consider using a software-packaging utility, such as the Access 2007 Developer Extensions Package Solution Wizard, to package your application into a Windows Installer Package (.msi file). You can then use the package to install the application.

You can use the Package Solution Wizard to:

  • Create a custom shortcut to the application. You can use this feature of the wizard to help make opening a compiled binary file easier for users who run your application by using the Access 2007 Runtime.

  • Add the install folder as a trusted location.

  • Automatically install the Access 2007 Runtime on a user's computer, if it is not already installed.

  • Include other files, such as a custom Help file, with your application.

  • Create or modify registry keys.

  • Distribute an end-user license agreement (EULA).

  • Add information about your application to the Add/Remove Programs list in Control Panel.

For more information about downloading and using the Access 2007 Developer Extensions, see the links in the See Also section.

Package a split database

The Access 2007 Developer Extensions Package Solution Wizard does not accommodate multiple installation paths. If your application has separate data and logic components, and you use the Access 2007 Developer Extensions to package your application, you may want to manually install the Access 2007 data files in the appropriate location, such as a file server.

An application that has separate data and logic components uses linked tables to connect the two components. Because every network is different, it may be impractical to specify the installation path of both components. In most cases, if you use the Package Solution Wizard, you will use the wizard only to package the logic component.

If you have enough information about the installation paths of the two components, you may want to create two installation packages by using the Package Solution Wizard so that you can specify the install path for each component.

Top of Page

Package and sign an Access 2007 database

Note: Although this feature is also known as "packaging," it does not accomplish the same tasks as the Package Solution Wizard of the Access 2007 Developer Extensions. The feature described in this section packages an Access 2007 file and applies a digital signature to the package that helps indicate to users that the file is trustworthy.

Access 2007 makes it easier and faster to sign and distribute a database than in previous versions of Access. After you create an .accdb file or .accde file, you can package the file, apply a digital signature to the package, and then distribute the signed package to other users. The Package-and-Sign feature places the database in an Access Deployment (.accdc) file, signs the package, and then places the code-signed package at a location on the user's computer that you determine. Users can then extract the database from the package and work directly in the database (not in the package file).

Remember these facts as you proceed to create and sign a package:

  • Packaging a database and signing the package are ways to convey trust. When you or your users receive the package, the signature confirms that the database has not been tampered with. If you trust the author, you can enable the content.

  • The new Package-and-Sign feature applies only to databases saved in the Access 2007 file format. Access 2007 provides tools from earlier versions of Microsoft Office that you can use to sign and distribute databases that were created in an earlier file format. You cannot use the tools from earlier versions of Office to sign and deploy files that were created in the new Access 2007 file formats.

  • You can add only one database file to a package.

  • When you package and and sign a database, all of the objects in the database file are code signed, not just macros or code modules. The packaging and signing process also compresses the package file to help reduce download times.

  • You can extract databases from package files that are located on Windows SharePoint Services 3.0 servers.

The following sections explain how to create a signed package file and use the database in a signed package file.

Note: To complete these steps, you must have at least one security certificate available. If you don't have a certificate installed on your computer, you can create one by using the SelfCert tool. For information about creating a private security certificate, see the article Help secure an Access 2007 database.

Create a signed package

  1. Open the database that you want to package and sign.

  2. Click the Microsoft Office Button Office button image , click Publish, and then click Package and Sign.

  3. In the Select Certificate dialog box, select a digital certificate, and then click OK.

    The Create Microsoft Office Access Signed Package dialog box appears.

  4. In the Save in list, select a location for your signed database package.

  5. Enter a name for the signed package in the File name box, and then click Create.

    Access creates the .accdc file and places it in the location that you chose.

Extract and use a signed package

  1. Click the Microsoft Office Button Office button image , and then click Open.

  2. In the Open dialog box, select Microsoft Office Access Signed Packages (*.accdc) as the file type.

  3. In the Look in list, locate the folder that contains your .accdc file, select the file, and then click Open.

  4. Do one of the following:

    • If you chose to trust the digital certificate that was applied to the deployment package, the Extract Database To dialog box appears. Go to step 5.

    • If you have not yet chosen to trust the digital certificate, an advisory message appears.

      1. Advisory message

      2. If you trust the database, click Open. If you trust any certificate from that provider, click Trust all from publisher. The Extract Database To dialog box appears.

  5. Optionally, in the Save in list, select a location for the extracted database and then, in the File name box, enter a different name for the extracted database.

If you are unsure of whether to trust a certificate, the article How to tell if a digital signature is trustworthy provides general information about checking the dates and other items in a certificate to help ensure that it is valid.

Top of Page

No comments:

Post a Comment