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...

Execute Command Object

Set rsObj cmdObj.Execute RecordsAffected, Parameters, Options Executes a query, SQL statement, or stored procedure. If it results in the creation of a recordset, that recordset can be immediately assigned to a Recordset object variable using the Set statement otherwise, the Set statement should not appear in the expression. The name of the Command object whose Execute method you are calling. Options Indicates what type of command is to be executed. The ADO constant values for this parameter...

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...

Set LocalelDs New Mail Object

ObjNewM amp il.SetLocaleIDs lngCodePagelD Sets the message sender's locale. This locale setting controls how certain internal features of the message, such as dates, will be evaluated. A required Long value that represents the code page identifier for the message Example ' Dimension local variables. Dim objNewMail Dim strRecipList Dim lngChineseCodePage 950 Set objNewMail ' Set the body string for the message. objNewMail.Body _ Wow, this message takes just a few lines of code. 284 Chapter 14 -...

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.

Close Connection Object Recordset Object

Connection.Close closes the connection to the underlying data provider Recordset.Close closes a recordset. Both versions of the Close method release system resources used to hold the object variables but do not remove the object from memory. The same object can be opened later without being instantiated again using the Server object's CreateObject method. The name of the Connection or Recordset you wish to close Example lt LANGUAGE VBSCRIPT gt lt Response.Buffer True gt lt HTML gt lt HEAD gt lt...