[access synchronization database] Generate Access database that can be shared on the Web

  Necessary? Microsoft no longer recommends the creation and use of Access 2010 web databases. For more information, see the Access 2010 web database roadmap.

  You can use Access 2010 and Access Services (SharePoint components) to build Web database applications. this helps:

  Protect and manage access to data

  Share data across the entire organization or via the Internet

  Note: The user account is required to use the Web database. Anonymous access is not supported.

  Create database applications that can be used without Access

  This article provides an overview of Access Web database design. For an introduction to desktop database design, see the two articles, Creating a New Desktop Database and Database Design Basics.

  Overview

  Create a Web database

  Publish and synchronize changes to the application

  Access 2010 and Access Services (an optional component of SharePoint) provide you with a platform for creating databases that can be used on the Web. You can use Access 2010 and SharePoint to design and publish a Web database, and users with SharePoint accounts can use the Web database in a Web browser.

  When you publish a Web database, Access Services will create a SharePoint site that contains this database. All database objects and data are moved to the SharePoint list on the site. The following video describes this process.

  Your browser does not support video.  Install Microsoft Silverlight, Adobe Flash Player or Internet Explorer 9.

  After you publish, SharePoint visitors can use your database based on their permissions on the SharePoint site.

  Full control This allows you to change data and design.

  Participating in this allows you to make data changes, but does not allow you to make design changes.

  Read This allows you to read data, but you cannot make any changes.

  You can open the Web database in Access, modify the design, and then synchronize the changes, which is actually to save the changes to the SharePoint site. The following video describes the process of making design changes after publishing a Web database.

  Your browser does not support video.  Install Microsoft Silverlight, Adobe Flash Player or Internet Explorer 9.

  You can also take the Web database offline, use the offline version, and then synchronize the data and design changes after you are online.

  Note: To build a Web database, you need to have full control permissions on the SharePoint site to which the database will be published. For more information about SharePoint permissions, see the "See also" section.

  Forms and reports run in the browser

  Forms, reports, and most macros run inside the browser. This allows Access to refresh the data on the screen without having to restore the entire page.

  You can create a form that helps users navigate your application. New controls (that is, navigation controls) allow you to easily add standard Web-style navigation buttons to the form to achieve this.

  Note: The navigation pane (the function used to browse objects in the database in Access) is not available in a web browser.

  Data is stored in SharePoint lists

  All tables become SharePoint lists, and all records become list items. This enables you to use SharePoint permissions to control access to Web databases and take advantage of other SharePoint features.

  Security Note: The connection string of the link table is not encrypted, including user and password information, provided that the information is saved, and the link target supports user accounts. In a database that has a link to a SharePoint list and the link includes a username and password, a malicious user can use saved credentials to change which list is the link target. Even if the credentials are not saved using a connection string, malicious users can modify permissions on the SharePoint site with the assistance of collaborators who already have sufficient permissions. Be careful when sharing a copy of a database and the database contains links to lists in published Web databases.

  Queries and data macros run on the server

  All SQL processing is performed on the server. This helps improve network performance by limiting the traffic of the result set.

  Intranet or Internet

  You can publish to your Intranet SharePoint server, you can also publish to the Internet. Microsoft provides a SharePoint hosting solution for the Internet.

  Back to top

  This section introduces the main new features and provides the steps to complete the basic design tasks required to create a Web database.

  before the start

  Design differences between desktop and Web databases

  Desktop only function (no corresponding Access Services function)

  Consider using templates

  Start with a blank web database

  Design Web Table

  Create a new Web table

  Add fields from the field library

  Add fields by clicking on the data table

  Change field properties

  Add calculated fields

  Set data validation rules

  Set field validation rules and messages

  Set record verification rules and messages

  Create a relationship between two Web tables

  Create a lookup field in the Data Table view

  Modify the lookup field in the "Data Table" view

  Use data macros to maintain data integrity

  Create a Web query

  Create a Web form

  Create a Web report

  Create a navigation form and set it as the default form displayed at startup

  Listed below are some tasks that should be performed before starting to design a Web database. In addition, you should understand the design differences between Web databases and desktop databases, especially for experienced Access developers.

  Determine the purpose of the database and develop a clear plan to make informed decisions when making design details.

  Linked tables cannot be used in the Web database to find and organize the required information. Before publishing, you must import all the data that you want to use, but not from the database. If you have data ready before you start designing, you can avoid readjusting your design to meet unexpected data challenges.

  Make sure that the SharePoint site that will be used for publishing does not have SharePoint, and you cannot publish any content. If you want to test your design in the browser at design time (good idea), you must first publish it.

  Planning security Use SharePoint security to control access to Web databases. Please plan for security early so that it can be incorporated into your design.

  Some database functions that are available in desktop databases are not available in Access Services. However, many scenarios supported by certain new features are the same as those supported by these desktop features.

  The following table lists desktop-only features and new features that can help support the same scenario.

  Program

  Desktop only features

  new features

  Design database objects

  Design view

  Enhanced data table view; layout view

  View summary data, such as sums, averages, and groups

  Group function

  Data macros; group functions in reports

  Event programming

  VBA

  Macros and data macros; use smart-aware macros to design new experiences

  Navigate to database object

  Navigation pane; switch panel

  Navigation controls or other form elements

  Important: You can create many client objects in the Web database, but you cannot use them in the browser. However, they are part of the Web database and can be used in Access 2010 on the desktop. Users can open the Web database in Access and use client objects. This is an effective way to share databases and creates new opportunities to work together through the Web. SharePoint handles all concurrency issues.

  Note: The list below is not exclusive.

  Joint query

  Crosstab query

  Overlapping controls on the form

  Table relationship

  Set conditional format

  Various macro operations and expressions

  When determining what an application must do, consider whether the database template is useful. Database templates are pre-built applications that can be used as is or modified to meet your specific needs.

  You can view the available templates on the "New" tab in Backstage view. For more information about the templates included with Access 2010, see the article Select and use Access templates.

  On the File tab, click New.

  New tab in Backstage view

  The File tab opens the Backstage view, which is a new part of the Access interface, where you can find commands that apply to the entire database, for example, "Publish to SharePoint."

  In Backstage view, the New tab contains commands for creating databases.

  Features of the "New" tab in Backstage view

  1. Under Available Templates, click Blank Web Database.

  2. Check the file name suggested in the File Name box and the path of the database file listed below. You can change the file name by typing in the "File name" box.

  3. To change the path, click the folder icon next to the "File name" box and browse for the location of the database file.

  4. Click Create. A new Web database will open and a new empty table will be displayed.

  Use the Data Table view to design Web tables.

  When you first create a blank Web database, Access will create a new table and open it in the Datasheet view. You can use the commands on the Fields tab and Tables tab to add fields, indexes, validation rules, and data macros. Data macros are a new feature that allows you to change data based on events.

  After editing and using the new table, you will most likely want to create more tables.

  Open your Web database and do the following:

  On the Create tab, in the Table group, click Table.

  When the table is first created, it contains one field: the AutoNumber ID field. You can add new fields to store the information items required by the table theme. For example, you may want to add a field that stores the date when you started tracking certain content.

  You can use the field library to select from multiple fields in preset formats and add them to your table.

  On the Fields tab, in the Add and Remove group, click the required field type.

  After opening the table, click "click to add" and select the required field type.

  Give this field a name that reflects its contents.

  Tip :? To change the name of an existing field, double-click the field name.

  Repeat this step for each field you want to create.

  The format and attributes determine the behavior of the field, for example, the type of data that can be stored. You can change these settings so that the field operates as desired.

  Select the field with the format and attributes to change.

  On the ribbon, click the Fields tab.

  Use the commands in the Format and Properties groups to change the settings.

  You can add a field to display values ​​calculated from other data in the same table. Data in other tables cannot be used as a source of calculated data. The calculated field does not support certain expressions.

  After opening the table, click "click to add".

  Point to Calculated Field, and then click the data type required for the field.

  The "Expression Builder" will open.

  Use the Expression Builder to create calculations for fields. Remember that you can only use other fields in the same table as the data source for calculations. For more information about help using the expression generator, see the article Using the expression generator.

  You can use expressions to verify the input of most fields. You can also use expressions to validate table input. This feature is useful if you need to validate input for fields that do not support validation, or if you want to validate field input based on the values ​​of other fields in the table. For a more complete description of verification, see the article Restrict data entry using validation rules.

  You can also specify the message (also called the verification message) that is displayed when the validation rule blocks input.

  Select the field to add the validation rule.

  On the ribbon, click the Fields tab.

  In the Field Validation group, click Validation, and then click Field Validation Rules.

  The "Expression Builder" will open.

  Use the expression builder to create validation rules. For more information about help using the expression generator, see the article Using the expression generator.

  In the Field Validation group, click Validation, and then click Field Validation Message.

  Type the message you want displayed when the input data is invalid, and then click OK.

  You can use record verification rules to prevent duplicate records, or you can require records to meet a certain combination of conditions, for example, [Start Date] is greater than January 1, 2010 and less than [End Date]

  Open the table where you want to add a verification rule.

  On the ribbon, click the Fields tab.

  In the Field Validation group, click Validation, and then click Record Validation Rule.

  The "Expression Builder" will open.

  Use the expression builder to create validation rules. For more information about help using the expression generator, see the article Using the expression generator.

  In the Field Verification group, click Verification, and then click Record Verification Message.

  Type the message you want displayed when the input data is invalid, and then click OK.

  To create a relationship in a Web database, you can use the Lookup Wizard to create a lookup field. The lookup field goes to the table at the "many" end of the relationship and points to the table at the "one" end of the relationship.

  Open the table that you want to place on the "many" end of this relationship.

  Click the arrow next to "Click to add", and then click "References and relationships."

  Follow the steps of the lookup wizard to create a lookup field.

  Open the table containing the lookup field you want to modify.

  Do one of the following:

  On the Fields tab, in the Properties group, click Modify Lookup.

  Right-click the lookup field, and then click Modify Lookup.

  Follow the steps of the Review Wizard.

  Use data macros to achieve cascading updates and deletes. You can use the commands on the Table tab to create embedded macros that modify data. The following video shows you the basics.

  Your browser does not support video.  Install Microsoft Silverlight, Adobe Flash Player or Internet Explorer 9.

  For more information on creating data macros, see the article Creating data macros.

  You can use queries as data sources for forms and reports. Queries run on the server to help minimize network traffic.

  For example, suppose you use a Web database to track charitable donations. You want to see who donated money while the event is going on. You can use queries to select data and prepare the data for use in forms and reports.

  Note:? This process uses a charity fundraising template as an example. If you use the charity fundraising database template to create a new database, you can follow this process.

  On the Create tab, in the Query group, click Query.

  In the Show Table dialog box, double-click each table that you want to include, and then click Close.

  In this example, double-click Constituents, Donations, Events, and EventAttendees.

  In the query design window, drag fields from one object to another, and create any required joins in this way.

  In this example, drag the ID field in Constants to the DonorConstituentID field in Donations, and then drag the DonorConstituentID field in Donations to the ConstantIDent field in EventAttendees.

  Add the fields to use. You can drag the field to the grid or double-click the field to add it.

  In this example, add Events in the Events table, DonationDate in the Donations table, and Greeting, FirstName, and LastName in the Constants table.

  Add any conditions to be applied.

  In this example, you want to limit DonationDate between the active StartDate and EndDate. In the query design grid, in the "Condition" row under DonationDate, type> = [StartDate] And <= [EndDate].

  Forms are the main way to enter and edit data in a Web database, and are also useful for reviewing data. The form runs in the browser, which helps optimize performance. When the form is opened, the browser will retrieve the required data from the SharePoint server. You can filter and sort the data in the form without having to retrieve the data from the server again.

  Tip: To achieve the best performance, please limit the number of records retrieved from the main form and report.

  Select the table or query to use as the data source.

  Note: If you want to create an unbound form, skip this step.

  On the Create tab, in the Form group, click one of the following buttons:

  The form uses an object selected as a data source to create a simple form that displays one record at a time.

  Note: If you are creating an unbound form, this button is not available.

  Multiple projects use objects selected as data sources to create forms that display multiple records at once.

  Note: If you are creating an unbound form, this button is not available.

  A blank form creates a form without any content.

  Data tables use objects selected as data sources to create forms that look and behave similarly to data tables.

  Note: If you are creating an unbound form, this button is not available.

  Reports are the main way to review or print the data in the Web database. The report runs in the browser, which helps optimize performance. When opening the report, the browser will retrieve the required data from the SharePoint server. You can filter and sort the data in the report without having to retrieve the data from the server again.

  Tip: To achieve the best performance, please limit the number of records retrieved from the main form and report.

  Select the table or query to use as the data source.

  On the Create tab, in the Report group, click one of the following buttons:

  The report uses the object selected as the data source to create a basic report.

  An empty report creates a report without any content.

  Users need a way to navigate your application. Remember? The navigation pane is not available in a web browser. In order for users to use your database objects, you must provide them with a method. You can create a navigation form and specify that this navigation form is displayed when others open your application through a web browser. However, if you do not specify a form to display when the application starts, no form will be opened, and it will be very difficult for anyone to use the application.

  Tip: You may need to wait until the end to create a navigation form, so you can add all objects to it when creating this form.

  On the ribbon, click the Create tab.

  In the Form group, click Navigation, and then select the navigation layout from the list.

  To add an item, drag it from the navigation pane to the navigation control.

  Note: You can only add forms and reports to the navigation control.

  Add any other controls you want to the body of the navigation pane. For example, you may need to provide search functionality across all panes by adding some controls to the navigation pane.

  On the File tab, under Help, click Options.

  In the Access Options dialog box, click Current Database.

  Under Application Options, click Web Display Form, and then select the required form from the list.

  Note:? It is not necessary to select the navigation form as the Web display form. You can specify any Web form.

  Back to top

  You can watch a video of this process in the "Overview" section.

  On the File tab, click Save and Publish, and then click Publish to Access Services.

  Click Run Compatibility Checker.

  Access Run Checker button in Backstage view

  The compatibility checker will help you ensure that the database is published correctly. If you find any problems, you should resolve them before publishing.

  Note :? If any problems are found, Access stores the problems in a table named "Web Compatibility Problems." Each row in the table contains links to troubleshooting information.

  Under "Publish to Access Services", fill in the following:

  In the Server URL box, type the URL of the SharePoint server where you want to publish the database. For example, http: // Contoso /.

  In the Web Site Name box, type the name of the Web database. This name will be appended to the server URL to generate the URL of the application. For example, if the "Server URL" is http: // Contoso / and the "Site Name" is CustomerService, then the URL is http: // contoso / customerservice.

  Click Publish to Access Services.

  After completing design changes or taking the database offline, you eventually need to synchronize. Synchronization can make up the difference between the database file on the computer and the database file on the SharePoint site.

  You can watch a video of this process in the "Overview" section.

  Open the Web database in Access and make design changes.

  When finished, click the "File" tab, and then click "Sync All".

  The "Sync All" button in the Backstage view of Access

  Back to top

Guess you like

Origin www.cnblogs.com/sqlserver-mysql/p/12737018.html