Friday March 29, 2024

       
      SteelArrow Basics
      SteelArrow Tags
  SteelArrow Functions
  SteelArrow Objects
  Advanced Topics
  WAS Overview
   
   
       
      Overview
  Code Samples
  Site Search
   
   
   


Get SteelArrow!     
  APPLICATION Table    
 
 
 
Return to Predefined Objects Page
 
The APPLICATION table contains information that is available to all users on a particular web application. To access information in the APPLICATION table use format APPLICATION.varaibleName, to set information in the table use the same format.

<!--- Name the APPLICATION  --->
<SAAPPLICATION NAME="someApp">

<!--- Set a value in the APPLICATION table --->
<SASET NAME=APPLICATION.variableName VALUE=value>

<!--- Clear a value in the APPLICATION table --->
<SASET NAME=APPLICATION.variableName VALUE="">

<!--- Ouptut a value from the APPLICATION table --->
<SAOUTPUT VALUE=APPLICATION.variableName[]>
         

The following example is a snippet of code showing the process of creating a TABLE in the APPLICATION table, and retrieving values from that contained table.


<!--- Name the APPLICATION  --->
<SAAPPLICATION NAME="someApp2">

<!--- Create a TABLE within the APPLICATION table --->
<SASET NAME=APPLICATION.appName VALUE=MakeTable( "inc,message" ) >

<!--- Within other scripts, you may now have --->
<SAIF COND=APPLICATION.appName.count .eq. 10>
   <SAOUTPUT VALUE=APPLICATION.appName.message>
</SAIF>
         

This type of functionality is very efficient for systems that may need to access a database on a regular basis. As an example, you are designing a community site that requires a list of areas from a database. The list does not change often enough to warrant a database, but at the same time for scalability, you do not want to edit numerous pages at a later date if the areas are changed for whatever reason.


<!--- Name the APPLICATION  --->
<SAAPPLICATION NAME="someApp3">

<!--- Create an areas TABLE --->
<SAQUERY NAME=APPLICATION.appName.areas DATASOURCE="..">
   SELECT areas FROM table
</SAQUERY>

<!--- Within other scripts, you may now have --->
<SASET NAME=areaTable[] VALUE=APPLICATION.appName.areas>
<SAFIRST NAME=areaTable>
<SAWHILE COND=areaTable.MoreData()>
   <!--- Output the areas --->
   <SANEXT NAME=areaTable>
</SAWHILE>
         





Copyright © 1998-2004 Tomahawk Technologies Inc.
Privacy Policy