Create Object

Set objMyObject Server.CreateObject(strProgId) Instantiates an object on the server. Once instantiated, this object's properties and methods can be used just as you can use the properties and methods of the built-in objects that come with ASP. The DLLs from which these objects are instantiated must be installed and registered on the web server machine separately from your installation of IIS. The name of a variable that will contain a reference to the object you are instantiating. The...

Http A Simple Example

You probably already know that HTTP is a transaction style protocol. The browser (the client) sends a request to the server. The server obeys the request if it can and sends a response back to the client. The server then completely forgets about the transaction. The browser may or may not forget about it. To illustrate the interaction between web browser and server, let's examine a fairly simple example that illustrates this exchange. Figure 6-1 shows Netscape Navigator displaying a very simple...

Notes

The first thing to remember is that the Buffer property must be set before the lt HTML gt tag is generated for the HTTP response. Attempting to set the Buffer property after the lt HTML gt tag will result in a runtime error. If your script includes a preprocessing directive setting the language for the page, for example, this directive must be placed before you attempt to set the Buffer property's value. If you attempt to set the language for the page after setting the value for the Buffer...

OpenAsText Stream File Object

FilObj.OpenAsTextStream intAccessMode , intFormat Opens a file and creates a TextStream object that you can use to read or modify the text file. An integer that indicates the input output mode in which you wish to open the text file. Possible values for this parameter are as follows The file will be opened as read-only and cannot be modified by the current TextStream object. The file will be opened for writing. If the file already exists when you call the OpenAsTextStream method, the original...

Type Library Declarations

lt -- METADATA TYPE TypeLibrary FILE FileName UUID TypeLibraryUUID VERSION MajorVersionNumber. MinorVersionNumber 154 Chapter 10 - Preprocessing Directives, Server-Side Includes, and GLOBAL. Type libraries are accessory files that contain information about the properties and methods of COM objects. These files describe any constants used by the object and the data types of acceptable property values. A type library enables your application to more accurately report errors in your use of the...

Clone Recordset Object

Creates an exact duplicate of a recordset and places that recordset into a second Recordset object variable. The Recordset object you wish to copy rsObj2 The new Recordset object into which you will place the copy of the Recordset object represented by the rsObj1 parameter The following example demonstrates the use of the Clone method of the Recordset object and the fact that the same bookmark values can be used in clones as in the originals to point to the same records. lt LANGUAGE VBSCRIPT gt...

Delete Recordset Object

Only the Delete method of the Recordset object is covered here. 212 Chapter 11 - ActiveX Data Objects 1.5 The Delete method of the Recordset object allows you to delete either the current record or a group of records. To delete a group of records, you must use the Filter property to define the group of records before deleting them. An integer constant that defines whether you want to delete only the current record or all records meeting the criteria set forth in the Recordset.Filter property....

Accessory Files Required DLL Files

The dynamic link library for the MyInfo component. It is installed with IIS. myinfo.xml The file in which your MyInfo component stores its values. Note You cannot change this filename. The component is hardcoded to look in this file. This is a standard XML file. The following is an example of a myinfo.xml file on an IIS web server The latest XML specification can be found at http www.w3.org TR REC-xml.

Instantiating the Page Counter Component

To create an object variable containing an instance of the Page Counter component, use the CreateObject method of the Server object. The syntax for the CreateObject method is as follows Set objMyObject Server.CreateObject strProgId objMyObject represents the name of a Page Counter object. strProgId represents the programmatic identifier ProgID for the Page Counter component its ProgID is IISSample.PageCounter. Instantiating the Page Counter Component 355 ' The following code uses the...