The Application object is used to share information among all users of a given 
application. 
   The ObjectContext object is used to either commit or abort a transaction (managed by 
the Microsoft Transaction Server) that has been initiated by a script contained in an ASP 
page.  
   The Request object retrieves the values that the client browser passed to the server 
during an HTTP request, and makes these values easily accessible to the programmer. 
   The Response object is used to send output to the client. 
   The Server object provides access to methods and properties on the server. Most of 
these methods and properties serve as utility functions. 
   The Session object is used to store information needed for a particular client session. 
Variables stored in the Session object are not discarded when the user jumps between 
pages in the application; instead, these variables persist for the entire user session.  
Session state is only maintained for browsers that support cookies. Note: ASP 3.0 does 
not support URL rewriting to maintain session state. 
An important aspect of any Web application is the integration with databases. Active Server 
Pages support this well. The following code example illustrates the ActiveX Data Object controls 
for database connectivity. Since IIS Version 4.0, automatic connection pooling is available, so 
the simple method of opening and closing connections can even be used for larger scale 
applications. 
<%@ language="VBScript" %>
Dispay user names

User names in data base:

<% Dim Conn
Dim UserNames
` Create a database connection object
set Conn = Server.CreateObject("ADODB.Connection")
` Create a result set object
set UserNames = server.CreateObject("ADODB.RecordSet")
` Establish the database connection (providing no username or password)
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = " & _
"C:\dataBases\Users.mdb"
` Execute the SQL statement
Set UserNames = Conn.Execute("SELECT UserNames FROM Users")
` Display the results
87 




Java Web Hosting Application Development Using Java Technologies Hosting




 
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.