1 Chapter 12 Working With Access 2000 on the Internet.
-
date post
19-Dec-2015 -
Category
Documents
-
view
219 -
download
0
Transcript of 1 Chapter 12 Working With Access 2000 on the Internet.
![Page 1: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/1.jpg)
1Chapter 12Chapter 12
Working With Access 2000 on the
Internet
Working With Access 2000 on the
Internet
![Page 2: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/2.jpg)
12Chapter ObjectivesChapter Objectives
• Review hyperlinks, HTML, and cascading style sheets
• Learn about data access pages
• Explore server-side sorting and filtering
• Learn about scripts and Active Server Pages
![Page 3: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/3.jpg)
12 Working With Access 2000 on the Internet
Working With Access 2000 on the Internet
• Two ways exist to link to Access 2000 database to a Web application: Use the Data Access Page (DAP) object that
exists in Access 2000 Use Active Server Pages (ASP) technology
![Page 4: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/4.jpg)
12HyperlinksHyperlinks
• Hyperlink field Contains the specification for a universal
resource locator (URL) Created in a table simply by choosing the
hyperlink data type as the field format for the attribute when you are designing the table
![Page 5: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/5.jpg)
12HyperlinksHyperlinks
• Two properties that can be manipulated: Hyperlink Address
Specifies the URLMay designate a specific file on a local network or a
local hard drive
Hyperlink SubAddressMay specifies a specific form within the database
![Page 6: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/6.jpg)
12HTMLHTML
• Hypertext Markup Language (HTML) Not a programming language, but a formatting
language Access 2000 permits tables, forms, reports, and
queries to be saved in an HTML format Static file
When working with forms, only a form’s Datasheet view can be saved as HTML
![Page 7: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/7.jpg)
12Cascading Style SheetsCascading Style Sheets
• Cascading style sheets (CSS) Make it easier to change page formats Contains the definition of various format
properties Can be used to format Web pages
If a change is made in the CSS, then all of the Web pages using it will reflect the change
![Page 8: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/8.jpg)
12 Working With Data Access Pages
Working With Data Access Pages
• Data access pages External files that provide a means to use
Access 2000 on the Internet Stored as separate HTML files
• To preview a page as it would appear in a browser, right-click the shortcut in the Database window and choose Web Page Preview
![Page 9: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/9.jpg)
12 Working With Data Access Pages
Working With Data Access Pages
• You can change the appearance of a data access page: Themes
Formatting templates
Add text, labels, and controls Add a picture or other image file as data in an
OLE Object field
![Page 10: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/10.jpg)
12Data Access Page PropertiesData Access Page Properties
• To view a data access page’s properties, click the title bar of the data access page after opening the Properties window
Figure 12-1 Property sheet for a data access page
![Page 11: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/11.jpg)
12Data Access Page PropertiesData Access Page Properties
• Properties of a data access page: DataEntry
Controls whether new records can be added to the underlying table
MaxRecordsAllows you to designate the number of records sent
to a client computer from a server RecordType
Determines whether a recordset is updateable
![Page 12: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/12.jpg)
12 The Record Navigation Control
The Record Navigation Control
• Record navigation control Unique to data access pages Provides the capability to perform many tasks
involving record navigation, record creation and deletion, and record sorting
![Page 13: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/13.jpg)
12 The Record Navigation Control
The Record Navigation Control
Figure 12-2 Record navigation control instance
![Page 14: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/14.jpg)
12 Grouping Data in Data Access PagesGrouping Data in Data Access Pages
• Grouping data on a data access page is similar to grouping data on a report with a sub-report except: Data displayed is dynamic Data access pages are interactive Data access pages that display grouped data are
read-only
![Page 15: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/15.jpg)
12 Grouping Data in Data Access PagesGrouping Data in Data Access Pages
• Group properties: Expanded by Default
When set to Yes, the data access page automatically displays the data within a grouping
Data Page SizeSettings determines the maximum number of
records to display within a particular grouping level
![Page 16: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/16.jpg)
12 Grouping Data in Data Access PagesGrouping Data in Data Access Pages
Figure 12-3 Expand control instance on a grouped data access page
![Page 17: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/17.jpg)
12 Server-Side Sorting and Filtering
Server-Side Sorting and Filtering
• Server-side sorting and filtering can save time when downloading data to the client
• Establish a default server-side sort order by setting the Default Sort property in the Sorting and Grouping dialog box
• When Access publishes a page as an Active Server Page, a server filter can be applied to perform the filtering operation on the server Only the filtered data are downloaded
![Page 18: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/18.jpg)
12Scripts and Access 2000Scripts and Access 2000
• You can associate VBA program code with events to customize an application in an Internet environment VBScript is a variation of VBA that works with
Internet Explorer 5Does not recognize VBA
![Page 19: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/19.jpg)
12Scripts and Access 2000Scripts and Access 2000
• VBScript differs from VBA in several ways: All variables in VBScript are variants Arguments passed to procedures and functions
cannot be typed Many functions found in VBA are not available
in VBScript
![Page 20: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/20.jpg)
12Scripts and Access 2000Scripts and Access 2000
• VBScript differs from VBA in several ways: Error-handling capabilities are not as
sophisticated in VBScript Symbolic constants are not predefined
To use them, you must create a file and include it yourself
![Page 21: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/21.jpg)
12Scripts and Access 2000Scripts and Access 2000
• Certain data access page events are not recognized when coded in JavaScript and script elements are case-sensitive in JavaScript
• You can add scripts by choosing Tools, Macros, and the Microsoft Script Editor from the menu bar Displays the Microsoft Development
Environment window
![Page 22: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/22.jpg)
12Scripts and Access 2000Scripts and Access 2000
Figure 12-5 Microsoft Development Environment window
![Page 23: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/23.jpg)
12Scripts and Access 2000Scripts and Access 2000
• When you connect an Active Server Page to an Access 2000 database Include a file, named adovbs.inc, that contains
predefined symbolic constants to facilitate establishing the database connection
![Page 24: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/24.jpg)
12 Active Server Pages and Access 2000
Active Server Pages and Access 2000
• Active Server Pages (ASP) Implemented as an Internet Server application
programming interface (ISAPI) filter running under Microsoft’s Internet Information Server (IIS)
![Page 25: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/25.jpg)
12Scripts and Access 2000Scripts and Access 2000
• Whenever a Web client sends an HTTP request to a Web server: The Active Server ISAPI filter has a chance to
intercept and interpret the request
• If the request involves an ASP file: The filter parses the entire file and returns
HTML output to IIS IIS then returns these data to the client
![Page 26: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/26.jpg)
12Scripts and Access 2000Scripts and Access 2000
• To implement ASP, you must have a Web server configured to support the technology
• System data source Data source that is accessible to all user ODBC 32 control panel on the server is used to
establish an Access database such as a system data source
![Page 27: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/27.jpg)
12Using the Global.asa FileUsing the Global.asa File
• Global.asa file performs two functions: Indicates where the scripts will be executed
In many cases, it takes place on the server to take advantage of the processing power typically available there
Amount of data transferred to the client can be minimized
![Page 28: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/28.jpg)
12Using the Global.asa FileUsing the Global.asa File
• Global.asa file performs two functions (continued): Implements scripts associated with four specific
eventsEvents that occur for the Application and Sessions
objects
• Application object Created when the application runs Responds to the OnStart and an OnEnd event
![Page 29: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/29.jpg)
12Using the Global.asa FileUsing the Global.asa File
• Session object Separate object is created for each user of the
application Responds to its own OnStart and OnEnd events
![Page 30: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/30.jpg)
12 Variables and the OnStart Event
Variables and the OnStart Event
• OnStart event of the Application object Used to initialize or update variables used by
the application
• Variables may include the number of users of the application or the number of users who have visited the Web site since the application started
![Page 31: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/31.jpg)
12 Variables and the OnStart Event
Variables and the OnStart Event
• OnStart event for the Session object Initializes variables for a particular user’s
session Timeout variable
Indicates how long a session is allowed to be idle before it is automatically terminated by the server
![Page 32: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/32.jpg)
12Session Variables in ASPSession Variables in ASP
• Session variable Can declare any number of Session variables
simply by using them Available to all ASP files that execute during
the session Acts like a global variable in other
programming languages
![Page 33: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/33.jpg)
12The OnEnd EventThe OnEnd Event
• OnEnd event for the Application object Occurs when the application ends
• OnEnd event for the Sessions object Occurs when the session ends Used to update persistent data relevant to the
application
![Page 34: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/34.jpg)
12Chapter SummaryChapter Summary
• Access 2000 provides several ways to create Web-enabled database applications Hyperlink data type
Fundamental Web-enabling object
New capabilities with the Access development environment for developing Web-enabled applications
![Page 35: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/35.jpg)
12Chapter SummaryChapter Summary
• DAP objects Not totally contained in the .mdb file associated
with an Access application
• Data access page Web page that must be accessible by a server
Web pages must be saved as an HTML file outside the .mdb file
![Page 36: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/36.jpg)
12Chapter SummaryChapter Summary
• Data access pages (continued) Created in much the same manner as forms or
reports Same toolbox is used for their creation
Contains additional, Web-specific tools for operations such as creating a bound HTML control
![Page 37: 1 Chapter 12 Working With Access 2000 on the Internet.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d365503460f94a0e657/html5/thumbnails/37.jpg)
12Chapter SummaryChapter Summary
• VBScript Variation of VBA
• Active Server Pages Provides an environment in which VBScript
and embedded SQL commands can be used to access data in Access databases and to create Web pages dynamically