Microsoft Access
  Home arrow Microsoft Access arrow Page 4 - Scripting a Data Access Page: a Simple Exa...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MICROSOFT ACCESS

Scripting a Data Access Page: a Simple Example
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 10
    2006-05-30

    Table of Contents:
  • Scripting a Data Access Page: a Simple Example
  • Creating a data access page
  • Adding a script to this page
  • Saving and Displaying the Data Access Page

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Scripting a Data Access Page: a Simple Example - Saving and Displaying the Data Access Page


    (Page 4 of 4 )

    Saving the file

    You need to save the page before displaying on a browser. Now from the file menu you can choose to save, and it will normally get saved to the default directory, C:My Documents.  If you want it saved to the web server, you may place it on the web server by saving it to the C:Inetpub/wwwroot, or to a virtual directory of your choice.

    You may however get the following message. Presently  the data source is referenced by its absolute path. If you want to connect to  it through the network, you may have to give the UNC path (ServerSharefile) name. Just click OK and proceed. It gets saved to the folder you chose. In the present tutorial it is saved to the virtual root of the IIS Server.

    Displaying the file and testing the script

    Since the data access page is on the website, it can be displayed by browsing the file with the IE. At first you will get this warning message shown in this window.

    When you click OK to the above you will get another warning about access as shown in the next picture.

    When you click OK to the above also, then you will see your data access page as shown here.

    It opens with the first record as shown. You can move to the other records by using the navigation buttons provided. We added the script to Command1 button with the caption 'London?'. Since we are on a record whose city field shows 'London' we can click the button. You may see a couple of message boxes if you have not commented out the MsgBox statements in the code, but you will finally see the page shown in the next picture.

    Now you may move out of Customers 1 and move to some other record where the city is not 'London,' such as the one shown in the next picture, and click on the command button. You will see the following window, which shows that the script is indeed working.

    Summary

    There are two requirements for successful scripting of a data access page, understanding the Microsoft Script Editor and the JavaScript object model. ECMA syntax is used in the code, which facilitates a standards-based approach to scripting. The script on this page is very simple, but one look at the Client Objects available for scripting shows an enormous potential for intricate scripting.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Using the built-in wizards you can do a lot, but with scripting you can do even...
     

    MICROSOFT ACCESS ARTICLES

    - Linking SQL Express 2005 Tables to MS Access...
    - Working with Access Projects in Access 2007
    - Exploring Access 2007
    - Working with Stored Procedures in an MS Acce...
    - Creating and Using Action Queries
    - Creating Data Access Pages with Charts using...
    - Advanced Ideas using VBA
    - VBA Details
    - Updating Records in MS Access
    - Using ADO`s Record Object with URLs
    - Exporting XML from MS Access 2003
    - Importing XML into MS Access 2003
    - On Using Pass-through Queries in MS Access
    - Distributed Queries in MS Access
    - Configuring a Linked Microsoft Access Server...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT