ASP Built-in Objects
The Server object represents the web server. Its most widely used method is CreateObject method, which instantiates any COM object in the library. This includes ActiveX components, both those developed by the user and the ActiveX Data Objects (ADO).
- ADO is fairly lightweight and allows easy access to any ODBC or OLEDB compliant data source including Microsoft Access (Jet), Microsoft SQL Server, and Oracle databases. In addition, ADO has built-in connection pooling.
The Session object maintains a set of variables on the server, and provides a way to share data among different pages used by the same client. For example, this script reads sets a value to a session variable named uid: <% Session("uid")= “somevalue” %>
- session data is also kept in the global.asa file
- Note that the session object maintains its state by cookies, unless you use the Cookie Munger filter on NT.