APPENDIX A
HTML 4.01 Basics
THIS APPENDIX PROVIDES A SHORT COURSE on Hypertext Markup Language
(HTML) for those new to HTML, plus a reference on HTML 4.01, which became a
specification in December 1999. HTML 4.01 makes obsolete version 4.0 that was
published in December 1997 and revised inApril1998. Versions ofHTML, nevertheless, change very quickly.
At the time of this writing, the World Wide Web Consortium (W3C), the body
that produces HTML specifications, has released XHTML 1.0 as the latest major
change to HTML. XHTML 1.0 is a reformulation ofHTML 4.01 in XML, and combines the strength of HTML 4 with the power ofXML. However, XHTML 1.0 requires understanding ofXML, which is beyond the scope of this book.
This appendix is divided into two parts: an introduction to HTML and a
group of tables that serve as a handy reference on HTML 4.01 tags. It is intended
only as a quick reference; a complete reference on HTML 4.01 can be found at the
W3C Web site at http : I !WNW. w3. org.
NOTE: Due to the rapid growth of the Internet- related industry, Web
browser makers often implement their own extensions to the HTML standard in their products before W3C comes up with a standard that specifies
those extensions. As a result, modern Web browsers don't fully comply with
the standards that came later. Worse still, extensions are almost always different in different browsers, sometimes resulting in confusion for those who
plan to implement HTML in their systems or applications. Several tags in
HTML 4.01, for example, are not supported in Netscape and Microsoft
browsers, even though this may change in the future.
A Crash Course on HTML
The following is a short but invaluable primer on HTML. It is intended as a quick
tour of the basics of HTML, which you should be able to breeze though here.
However, feel free to go back for a refresher later on.
411
Appendix A
Document Structure
An HTML file consists of HTML elements represented by tags. A standard HTML
file consists of three parts: a line containing HTML version information, the head
section, and the body section. The skeleton of an HTML file is as follows:
<!DOCTYPE .•. >
<HTML>
<HEAD>
the head section
</HEAD>
<BODY>
the body section
</BODY>
</HTML>
The<! DOCTYPE> tag specifies the version of the HTML in the document; for
example:
<! DOCTYPE HTML PUBLIC "-I /W3C/ /DTD HTML 4.0 Transitional/ /EN" "html4.dtd">
This tag is useful for Web browsers and other HTML parsers to correctly interpret
the HTML coding.
Web browsers are lenient, though. For example, they seem quite happy to
accept an HTML file in which the <! DOCTYPE> tag has been left out.
The head section is the HTML document header. It contains generic information about the document, including the title, the base URL, the style, and such.
The body section contains the text you want the Web browser to display.
Note that elements are not the same as tags. Tags are the representation of
elements in the file. For instance, the HEAD element is always present, even
though the HEAD tags may not be.
Tags are always enclosed by angled brackets (for example, <HEAD>), and
case-insensitive. Normally, they are written in uppercase letters to make them
standout.
There are two types of tags: the start tag and the end tag. End tags are the
same as start tags, except that they are preceded by a forward slash (for example,
</HEAD>). Some elements, such as the HEAD element, are represented by both the
start tag and the end tag. Some, such as <BR>, are represented by start tags only.
Most elements can be nested. However, you should always pay attention to
the order. For instance, the following is a valid code line:
<B>This is printed in bold. <!>And this is in bold and italic</I><IB>
412
HTML 4.01 Basics
The following is illegal, even though most browsers will still render it:
<B>This is printed in bold. <!>And this is in bold and italic</B><II>
An element can also have one or more properties, which are called attributes,
that extend its capabilities. Each attribute may have a default value, and an
attribute's value can be set by scripts or the HTML author. The attribute/value
pair must appear before the final">" of an element's start tag. Because an element
can have more than one attribute, these attribute/value pairs are separated by
spaces. The attribute/value pairs may appear in any order.
According to the HTML Recommendations, all attribute values must be delimited using either double quotation marks (ASCII decimal34) or single quotation marks (ASCII decimal38). Again, Web browsers are not fussy if you don't use
these marks. If you don't use single or double quotation marks, however, the value
may contain only letters (a-z andA-Z), digits (0-9), underscore characters, and
colons. The following is the syntax for attributes:
<TagName Attribute=value>
Text Formatting
You can format text using the tags listed on the section ''A Quick Reference to
HTML Tags" later in this appendix. For example, to display a piece of text in bold,
you can enclose it with the <B> and <IB> pair:
This is <b>bold</b>
You can also use the <I> ... <II> tags to italicize text and <U> ••. <IU> tags
to underline it.
On top of that, you can use the <FONT> ... </FONT> tags to display text using
certain fonts. The <FONT> tag has attributes such as COLOR and SIZE to let you
control the text appearance.
Special Characters
Some characters, such as"<",">" and"&", have special meanings in HTML. Upon
encountering these characters in text, the HTML parser may interpret these
characters incorrectly. To include these characters in text, you can use character
references, which are numeric equivalents of symbolic names for these special
characters.
413
Appendix A
Character references are also useful for referring to characters that cannot be
entered directly from the keyboard, such as aor JE. Character references always
begin with a"&" sign and end with a semicolon. Some examples include:
• &nbsp; for space, because you can only have one space between words or
non-space characters
• &1 t; for the < sign.
• &gt; for the > sign.
• &quot; for the double quotation mark.
• &amp; for the ampersand & character.
• &#192; for ASCII character number 192 decimal.
Images
You use the <IMG> tag to include an image in an HTML document. There are two
types of image files that can be rendered by Web browsers: .gif and .jpg (or .jpeg).
You must use the SRC attribute of the <IMG> tag to specify the file you use as the
source of the inclusion. For instance, to display the butterfly.gif image file that
resides in the images directory of your Web site, you can write the following:
<IMG SRC=http://www.yourdomain.com/images/butterfly.gif>
Colors
Some tags have the attributes that accept color values. For example, the <FONT>
tag has the COLOR attribute that determines the color of the text enclosed by the
<FONT> and </FONT> tags.
A color value is represented as a six-digit hexadecimal value. The first two digits represent the red component, the next two the green component, and the last
two digits represent the blue component. Each component can have values in the
range 00 to FF inclusively. For example, pure green is represented by OOFFOO. The
value OOEEOO is also green, only less intense. By changing the three components
values, you can produce more than 24 million different colors. The following
example displays text in red:
<FONT COLOR=FFOOOO>This is red.</FONT>
414
HTML 4.01 Basics
Hyperlinks
Hyperlinks are what you use to enable your users to navigate to other documents
or URLs by a single click of mouse. To include a hyperlink in your HTML document, you use the anchor element which is represented by the <A> tag. In order
for the hyperlink to reference the correct document or URL, you must use the
HREF attribute. An example is
<A HREF=www.MyDomain.comiAnotherPage.htm>Click here to see another page.<IA>
If the base part of the URL is not present, the Web browser will search the
page in the same URL base as the current HTML document.
Tables
You can use tables to display a set of data structured in rows and columns. The individual cell can contain not only text, but other HTML elements such as images.
A table is enclosed by the <TABLE> and </TABLE> tags. When using a table, chances
are you will also be using the <TR> and <TO> elements. The <TR> tag defines the
start of the table row and the <TO> tag defines the start of the table cell. An example of a simple table is given here. The table has three rows and two columns.
<TABLE>
<TR>
<TD>
<B>Country<IB>
<lTD>
<TD>
<B>Capital<IB>
<lTD>
<ITR>
<TR>
<TD>
Australia
<lTD>
<TD>
Canberra
<lTD>
<ITR>
<TR>
<TD>
Malaysia
<lTD>
415
Appendix A
<TD>
Kuala Lumpur
<lTD>
<ITR>
</TABLE>
This will be displayed like a normal table in the Web browser. It should look
like the following table:
COUNTRY
CAPITAL
Australia
Malaysia
Canberra
Kuala Lumpur
Forms
You can use forms to prompt users for information, and then carry out actions
based on that input. You use the <FORM> and </FORM> tags to create a FORM element in your HTML document. The <FORM> and </FORM> tags enclose one or more
other elements, especially INPUT elements.
An INPUT element can have the following types: TEXT, PASSWORD, HIDDEN, CHECKBOX, RADIO, RESET, SUBMIT, IMAGE, BUTTON and FILE. In addition to INPUT elements, you can also insert TEXTAREA and SELECT elements
into a FORM element.
An important attribute of the FORM element is the METHOD attribute. This
attribute defines the method used to send the data to the server and can have one
of these values: POST and GET. When the METHOD attribute is not present, the
Web browser will use the GET method to submit the form. Another important
attribute is the ACTION attribute. It is used to specify the URL that will receive
the data when the form is submitted.
You can have more than one FORM element in your HTML document, but
you can't nest the elements. Following is an example of a form:
<FORM METHOD=POST ACTION="Processor.asp">
Last name: <INPUT NAME=LastName TYPE=TEXT>
<BR>First name: <INPUT NAME=FirstName TYPE=TEXT>
<BR>Password: <INPUT NAME=Password TYPE=PASSWORD>
<BR><INPUT TYPE=SUBMIT>
</FORM>
416
HTML4.01 Basics
A Quick Reference to HTML Tags
Tables A-1 through A-8 in this section list commonly used HTML tags and descriptions of how they are used.
Table A -1. Document Structure
<!- ->
DESCRIPTION
Denotes a comment that is ignored by Web browsers.
<!OOCTYPE>
Declares the type and content format of the document.
<BOO>
Thrns off the bidirectional rendering algorithm for selected
fragments of text.
<BODY>
Defines the beginning and the end of the body section of the page.
<COMMENT>
Denotes a comment that will not be displayed.
<DEL>
Indicates a section of the document that has been deleted since a
previous version.
<DIV>
Defines a container section within the page that can hold other
elements.
<HEAD>
Contains tags holding unviewed information about the document.
<HTML>
The outer tag for the page, identifying the document as an HTML
page.
<INS>
Indicates a section of the document that has been inserted since a
previous version.
<ISINDEX>
<META>
Indicates the presence of a searchable index.
<NOSCRIPT>
Defines the HTML to be displayed in browsers that do not support
scripting.
<SCRIPT>
Specifies a script for the page that will be interpreted by a script
engine.
<SPAN>
Used with a style sheet to define nonstandard attributes for text on
the page.
TAG
Provides various types of unviewed information or instructions to
the browser.
417
Appendix A
Table A-2. Text Formatting
TAG
<ABBR>
DESCRIPTION
Indicates a sequence of characters that compose an acronym.
<ACRONYM>
Indicates a sequence of characters that compose an acronym.
<ADDRESS>
Specifies information such as address, signature, and authorship.
<B>
Renders text in boldface.
<BIG>
Renders text in a relatively larger font than the current font.
<BLOCKQUOTE> Denotes a quotation in text, usually a paragraph or more.
418
<BR>
Inserts a line break.
<CENTER>
Causes the enclosed text and other elements to be displayed on the
center of the page.
<CITE>
Cites text by rendering it in italics.
<CODE>
Renders text as a code sample in a fixed-width font.
<EM>
Renders text as emphasized, usually in italics.
<FONT>
Deprecated in HTML 4.0. This tag specifies the font face, size, and
color for rendering the text.
<Hn>
The six elements <Hl> to <H6> render text as a range of heading
styles.
<HR>
<I>
Places a horizontal rule in the page.
Renders text in an italic font where available.
<KBD>
Renders text in fixed-width font.
<P>
Denotes a paragraph. The end tag is optional.
<PRE>
Renders text in fixed-width type.
<SAMP>
Renders text as a code sample listing.
<SMALL>
Specifies that text be displayed with a smaller font than the current
font.
<STRONG>
Renders text in bold face.
<STYLE>
Specifies the style sheet properties for the page.
<SUB>
Renders text as a subscript using a smaller font than the current font.
<SUP>
Renders text as a superscript using a smaller font than the current
font.
<TT>
Renders text in fixed-width type.
<U>
Renders text underlined.
<VAR>
Renders text as a small fixed-width font.
HTML 4.01 Basics
Table A -3. Lists and Definitions
TAG
<DD>
<DL>
<DFN>
<DT>
<LI>
<OL>
<UL>
DESCRIPTION
The definition of an item in a definition list, usually indented from other
text.
Denotes a definition list.
The defining instance of a term.
Denotes a definition term within a definition list.
Denotes one item within an ordered or unordered list.
Renders lines of text that have <LI> tags as an ordered list.
Renders lines of text that have <LI> tags as a bulleted list.
TableA-4. Links to Other Documents and Resources
TAG
<A>
<AREA>
<BASE>
<LINK>
<MAP>
<Q>
DESCRIPTION
Defines a hypertext link. The HREF or the NAME attribute must be
specified.
Specifies the shape of a "hot spot" in a client-side image map.
Specifies the document's base URL.
Defines a hyperlink between the document and some other resource.
Specifies a collection of hot spots for a client-side image map.
The URL of the source document or message used as a quotation in the
page.
Table A-5. Forms and Form Elements
TAG
<BUTION>
<FIE LDSET>
<FORM>
<INPUT>
<LABEL>
<LEGEND>
<OPTION>
<OPTGROUP>
<SELECT>
<TEXTAREA>
DESCRIPTION
Renders an HTML button; the enclosed text is used as the button's
caption.
Draws a box around the contained elements to indicate related items.
Denotes a form containing elements, whose values can be sent
to a server.
Specifies a form input element, such as text or check box.
Defines the text of a label for a label control like element.
Defines the title text to place in the 'box' created by a
<FIELDSET> tag.
Denotes one choice in a <SELECT> drop-down or list element.
Allows authors to group choices into a hierarchy.
Defines a list box or drop-down list.
Specifies a multi-line text input element.
419
Appendix A
TableA-6. Tables
TAG
<CAPTION>
DESCRIPTION
Specifies a caption to be placed next to a table.
<COL>
Used to specify column based defaults for a table.
<COLGROUP>
Used as a container for a group of columns.
<TABLE>
Denotes a table.
<TBODY>
Denotes the body of a table.
<TO>
Specifies a cell in a table.
<TFOOT>
Denotes a set of rows to be used as the footer of a table.
<TH>
Denotes a set of rows to be used as the header of a table.
<THEAD>
Denotes a set of rows to be used as the header of a table.
<TITLE>
Denotes the title of the document, and used in the browser's window
title bar.
<TR>
Specifies a row in a table.
Table A-7. Frames and Layers
TAG
<FRAME>
DESCRIPTION
Specifies an individual frame within a frameset.
<FRAME SET>
Specifies a frameset containing multiple frames and other nested
framesets.
<I FRAME>
Used to create in-line floating frames within the page.
<NOFRAMES>
Defines the HTML to be displayed in browsers that do not support
frames.
Table A-8. Graphics and Other Objects
TAG
420
<APPLET>
DESCRIPTION
Deprecated in HTML 4.0. Places a Java applet or other executable
content in the page.
<IMG>
Embeds an image or a video clip in the document.
<OBJECT>
Inserts an object or other non-intrinsic HTML element into the page.
<PARAH>
Used in an <OBJECf> or <APPLET> tag to set the object's properties.
APPENDIX B
ASP 2.0 and ASP 3.0
Built-in Objects
THIS APPENDIX COVERS ASP 2.0 AND ASP 3.0 objects that are included with the
installation of liS 4.0 and liS 5.0. It provides a reference on the methods, properties, collections, and syntax for each object. I've also made note of any ASP 3.0only objects, properties, or methods.
Application Object
You can use the Application object to share information among all users of your
liS application. Note that the Lock and Unlock methods can ensure that multiple
users do not try to alter a property simultaneously.
Syntax
Application.method
Collections
The Application object's collections include:
DESCRIPTION
Contains all of the items that have been added to the Application
through script commands.
StaticObjects Contains all of the objects added to the session with the <OBJECT> tag.
COLLECTION
Contents
Methods
The Application object's methods include:
421
AppendixB
METHOD
Contents.Remove (ASP 3.0 only)
Contents.RemoveAll (ASP 3.0 only)
Lock
Unlock
DESCRIPTION
Deletes an item from the Application object's
Contents collection.
Deletes all items from the Application object's
Contents collection.
Prevents other clients from modifying
Application object properties.
Allows other clients to modify Application object
properties.
Events
Scripts for the following events are declared in the Global.asa file:
Application_OnEnd
Application_OnStart
ASPError Object (ASP 3.0 only)
You can use the ASP Error object to obtain information about an error condition
that has occurred within a script in an ASP page. The ASP Error object is returned
by the Server .GetlastError method
Syntax
ASPError.property
Properties
The ASPError object exposes the following read-only properties:
PROPERTY
ASPCode
Number
Source
422
DESCRIPTION
Returns an error code generated by liS 5.0.
Returns the standard COM error code.
Returns the actual source code, when available, of the line that
caused the error.
ASP 2.0 and ASP 3.0 Built-in Objects
Category
File
Line
Column
Description
ASPDescription
Indicates if the source of the error was internal to ASP, the scripting
language, or an object
Indicates the name of the .asp file that was being processed when
the error occurred.
Indicates the line within the .asp file that generated the error.
Indicates the column position within the .asp file that generated
the error.
Returns a short description of the error.
Returns a more detailed description of the error if it is an ASPrelated error.
Request Object
The Request object retrieves the values that the client browser passed to the
server during an HTI'P request.
Syntax
Request[.collectionfpropertyfmethod](variable)
The variable parameters are strings that specify the item to be retrieved from a
collection or to be used as input for a method or property.
Collections
The Request object's collections include:
COLLECTION
DESCRIPTION
ClientCertificate
The values of fields stored in the client certificate that is sent in the
HTIP request.
The values of cookies sent in the HTIP request.
The values of form elements in the HTIP request body.
The values of variables in the HTTP query string.
The values of predetermined environment variables. The server
environment variables are summarized in Table B-1.
Cookies
Form
QueryString
ServerVariables
423
AppendixB
Table B-1 Server Environment Variables
VARIABLE
All.._HTIP
DESCRIPTION
All HTfP headers sent by the client.
All.._RAW
Retrieves all headers in the raw-form. ALL_HTIP places
an HTTP_ prefix before the header name and the
header-name is always capitalized, whereas in
All_RAWthe header name and values appear as they
are sent by the client.
Retrieves the metabase path for the Application for the
ISAPIDLL.
Retrieves the physical path corresponding to the
metabase path. liS converts the APPL_MD_PATH to the
physical (directory) path to return this value.
APPL_MD_PATH
APPL_PHYSICAL_PATH
AUTH_PASSWORD
AUTH_TYPE
AUTH_USER
CERT_COOKIE
CERT_FLAGS
CERT_ISSUER
424
The value entered in the client's authentication dialog.
This variable is only available if Basic authentication is
used.
The authentication method that the server uses to
validate users when they attempt to access a protected
script.
Raw authenticated user name.
Unique ID for client certificate, Returned as a string.
Can be used as a signature for the whole client
certificate.
bitO is set to 1 if the client certificate is present. bitl is
set to 1 if the Certifying Authority of the client
certificate is invalid (not in the list of recognized CA on
the server).
Issuer field of the client certificate (O=MS, OU=IAS,
CN=user name, C=USA).
CERT_KEYSIZE
Number of bits in Secure Sockets Layer connection key
size; for example, 128.
CERT_SECRETKEYSIZE
Number of bits in server certificate private key; for
example, 1024.
CERT_SERIALNUMBER
CERT_SERVER_ISSUER
CERT_SERVER_SUBJECT
Serial number field of the client certificate.
Issuer field of the server certificate.
Subject field of the server certificate.
CERT_SUBJECT
CONTENT_LENGTH
CONTENT_TYPE
Subject field of the client certificate.
The length of the content as given by the client.
The data type of the content. Used with queries that
have attached information, such as the HTfP queries
GET, POST, and PUT.
ASP 2.0 and ASP 3.0 Built-in Objects
VARIABLE
GATEWAY_INTERFACE
DESCRIPTION
The revision of the CGI specification used by the
server. The format is CGI/revision.
HTTP_<HeaderName>
The value stored in the header HeaderName. Any
header other than those listed in this table must be
prefixed by HTTP_ in order for the ServerVariables
collection to retrieve its value. Note: The server
interprets any underscore U characters in
HeaderName as dashes in the actual header. For
example if you specify HTTP_MY_HEADER, the server
searches for a header sent as MY-HEADER.
HTTP_ACCEPT
Returns the value of the Accept header.
HTTP_ACCEPT_LANGUAGE
Returns a string describing the language to use for
displaying content.
HTTP_USER_AGENT
Returns a string describing the browser that sent the
request.
HTTP_COOKIE
Returns the cookie string that was included with the
request.
HTTP_REFERER
Returns a string containing the URL of the original
request when a redirect has occurred.
HTTPS
Returns ON if the request came in through secure
channel (SSL) or it returns OFF if the request is for a
nonsecure channel.
HTTPS_KEYSIZE
Number of bits in Secure Sockets Layer connection key
size; for example, 128.
HTTPS_SECRETKEYSIZE
Number of bits in server certificate private key; for
example, 1024.
HTTPS_SERVER_ISSUER
Issuer field of the server certificate.
HTTPS_SERVER_SUBJECT
Subject field of the server certificate.
INSTANCE_ID
The ID for the liS instance in textual format. If the
instance ID is 1, it appears as a string. You can use this
variable to retrieve the ID of the Web-server instance
(in the metabase) to which the request belongs.
INSTANCE_META_PATH
The metabase path for the instance of liS that responds
to the request.
LOCAL_AD DR
Returns the Server Address on which the request came
in. This is important on multi-homed machines where
there can be multiple IP addresses bound to a machine
and you want to find out which address the request used.
LOGON_USER
The Windows NT account that the user is logged into.
425
AppendixB
Table B-1 Continued
VARIABLE
PATH_INFO
PATH_TRANSlATED
QUERY_STRING
REMOTE_ADDR
REMOTE_HOST
REMOTE_USER
REQUEST_METHOD
SCRIPT_NAME
SERVER_NAME
SERVER_PORT
SERVER_PORT_SECURE
SERVER_PROTOCOL
SERVER_SOFTVVARE
URL
DESCRIPTION
Extra path information as given by the client. You can
access scripts by using their virtual path and the
PATH_INFO server variable. If this information comes
from a URL, it is decoded by the server before it is
passed to the CGI script.
A translated version ofPATH_INFO that takes the path
and performs any necessary virtual-to-physical
mapping.
Query information stored in the string following the
question mark (?) in the HTTP request.
The IP address of the remote host making the request.
The name of the host making the request. If the server
does not have this information, it will set REMOTE_ADDR
and leave this empty.
Unmapped user-name string sent in by the User. This
is the name that is really sent by the user as opposed to
the names that are modified by any authentication
filter installed on the server.
The method used to make the request. For HTTP, this is
GET, HEAD, POST, and so on.
A virtual path to the script being executed. This is used
for self-referencing URLs.
The server's host name, DNS alias, or IP address as it
would appear in self-referencing URLs.
The port number to which the request was sent.
A string that contains either 0 or 1. If the request is
being handled on the secure port, then this will be 1.
Otherwise, it will be 0.
The name and revision of the request information
protocol. The format is protocol/ revision.
The name and version of the server software that
answers the request and runs the gateway. The format
is name/ version.
Gives the base portion of the URL.
Property
The Request object has one read-only property, TotalBytes, which specifies the
total number of bytes the client is sending in the body of the request.
426
ASP 2.0 and ASP 3.0 Built-in Objects
Method
The Request object has a BinaryRead method, which retrieves data sent to the
server from the client as part of a POST request.
Response Object
The Response object is used to send output to the client.
Syntax
Response [.collectionfpropertyfmethod](variable)
Collections
The Response object has a Cookies collection, which specifies cookie values. Using
this collection, you can set cookie values.
Properties
The properties of the Response object include:
PROPERTY
DESCRIPTION
Buffer
CacheControl
Indicates whether page output is buffered.
Determines whether proxy servers are able to cache the output
generated by ASP.
Appends the name of the character set to the content-type
header.
Specifies the HTfP content type for the response.
Specifies the length of time before a page cached on a browser
expires.
Specifies the date and time on which a page cached on a
browser expires.
Indicates whether the client has disconnected from the server.
Charset
ContentType
Expires
ExpiresAbsolute
IsClientConnected
Pies
Status
Adds the value of a PICS label to the pies-label field of the
response header.
The value of the status line returned by the server.
427
AppendixB
Methods
The Response object has the following methods:
METHOD
AddHeader
AppendToLog
BinaryWrite
Clear
End
Flush
Redirect
Write
DESCRIPTION
Sets the HTML header name to value.
Adds a string to the end of the Web server log entry for this request.
Writes the given information to the current HTTP output without
any character-set conversion.
Erases any buffered HTML output.
Stops processing the .asp file and returns the current result.
Sends buffered output immediately.
Sends a redirect message to the browser, causing it to attempt to
connect to a different URL.
Writes a variable to the current HTTP output as a string.
Server Object
The Server object provides access to methods and properties on the server. Most
of these methods and properties serve as utility functions.
Syntax
Server.propertyfmethod
Property
The Server object has a ScriptTimeout property which indicates the amount of
time that a script can run before it times out.
Methods
The Server object has the following methods:
METHOD
CreateObject
Execute (ASP 3.0 only)
GetLastError (ASP 3.0 only)
HTMLEncode
428
DESCRIPTION
Creates an instance of a server component.
Executes an .asp file.
Returns an ASPError object that describes the error
condition.
Applies HTML encoding to the specified string.
ASP 2.0 and ASP 3.0 Built-in Objects
METHOD
DESCRIPTION
Map Path
Maps the specified virtual path, either the absolute
path on the current server or the path relative to the
current page, into a physical path.
Sends all of the current state information to another
.asp file for processing.
Applies URL encoding rules, including escape
characters, to the string.
Transfer (ASP 3.0 only)
URLEncode
Session Object
You can use the Session object to store information needed for a particular user
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.
The Web server automatically creates a Session object when a Web page from
the application is requested by a user who does not already have a session in
progress. The server destroys the Session object when the session expires or is
abandoned.
Syntax
Session.collectionlpropertylmethod
Collections
The Session object's collections include:
COLLECTION
DESCRIPTION
Contents
Contains the items that you have added to the session with script
commands.
Contains the objects created with the <OBJECT> tag and given
session scope.
StaticObjects
Properties
The properties of the Session object include:
429
AppendixB
PROPERTY
CodePage
LCID
SessioniD
Timeout
DESCRIPTION
The codepage that will be used for symbol mapping.
The locale identifier.
Returns the session identification for this user.
The timeout period for the session state for this application, in
minutes.
Methods
The methods of the Session object include:
DESCRIPTION
Destroys a Session object and releases its
Abandon
resources.
Deletes an item from the Contents collection.
Contents.Remove (ASP 3.0 only)
Contents.RemoveAll (ASP 3.0 only) Deletes all items from the Contents collection.
METHOD
Events
Scripts for the following events are declared in the global.asa file:
Session_OnEnd
Session_OnStart
430
APPENDIX C
ADO 2.5 Objects and
Collections at a Glance
DuE TO SPACE LIMITATIONS, A COMPLETE reference for all ADO 2.5 objects and col-
lections cannot be included here. Nevertheless, you can obtain a comprehensive
version of this brief appendix by heading to the Apress Web site (http: /I '~Mi.
a press. com) and looking up this title's page.
At the Web site, you will find a complete reference on the methods, properties, and events of the objects and collections, and enumerated constants for parameter values of the methods, all in a downloadable PDF file. The concise version, presented in the following table, summarizes all the ADO 2.5 objects and
collections.
Table C-1. ADO 2.5 Objects and Collections
OBJECT/COLLECTION DESCRIPTION
Connection
A Command object is a definition of a specific command that you
intend to execute against a data source.
A Connection object represents an open connection to a data
Error
source.
An Error object contains details about data access errors
Command
Errors
Field
pertaining to a single operation involving the provider.
The Errors collection contains all the Error objects created in
response to a single failure involving the provider.
A Field object represents a column of data within a common data
type.
Fields
Parameter
Parameters
Properties
Property
A Fields collection contains all of the Field objects of a Record set
object.
A Parameter object represents a parameter or argument associated
with a Command object based on a parameterized query or stored
procedure.
A Parameters collection contains all the Parameter objects of a
Command object.
A Properties collection contains all the Property objects for a
specific instance of an object.
A Property object represents a dynamic characteristic of an ADO
object that is defined by the provider.
431
AppendixC
Table C-1. ADO 2.5 Objects and Collections (continued)
OBJECT/COLLECTION DESCRIPTION
Record
Recordset
Stream
432
A Record object represents a row in a recordset, or a file or
directory in a file system or Web resource.
A Recordset object represents the entire set of records from a base
table or the results of an executed command. At any time, the
Record set object only refers to a single record within the set as the
current record.
A Stream object represents a stream of text or binary data.
APPENDIX D
Structured Query
language {SQL)
THIS APPENDIX SERVES AS A GUIDE TO WRITING SQL statements most commonly
used with the SQI2-compliant RDBMS products. The SQL statements and examples described in this appendix should work in any RDBMS. However, implementations are slightly different from one vendor to another, in which each RDBMS
vendor usually adds its own functions to the standard SQI2.
In a RDBMS, SQL can be used for
• Data manipulation, such as retrieving data, inserting new rows of data, updating rows of data, and deleting rows of data
• Data definition; for example, creating and deleting a table, an index, or a
view
• Access control; that is, granting and revoking access to a certain user
• Transaction control
SQL is the language for retrieving, managing and organizing data stored in a
relational database management system (RDBMS). The official standard for SQL
was published by the American National Standards Institute (ANSI) and the
International Standards Organization (ISO) in 1986 and was expanded in 1989.
This first version of SQL is also known as SQLl. SQLl was then expanded as SQI2
in October 1992. SQI2 is also known as SQL-92.
NOTE: In this appendix, the words "columns" and "fields" are used inter-
changeably, as are the words "rows" and ''records."
Table Data Types
Each column or field in a table has a data type and only data of this type can be
inserted into the column. For example, if a column data type is numeric, you can
433
AppendixD
only store numbers in that column, not text or dates. A list of data types specified
in SQL2 is provided in Table D-1.
Table D-1. SQI2 Data Types
DATA TYPE
CHAR Oength)
CHARACTER Oength)
DESCRIPTION
Fixed-length character strings
VARCHAR Oength)
CHAR VARYING Oength)
CHARACTER VARYING Oength)
Variable-length character strings
NCHAR Oength)
NATIONAL CHAR Oength)
NATIONAL CHARACTER Oength)
Fixed-length national character strings
NCHAR VARYING Oength)
NATIONAL CHAR VARYING (length)
NATIONAL CHARACTER VARYING Oength)
Variable-length national character strings
INTEGER
INT
Integer numbers
SMALUNT
Small integer numbers
BIT Oength)
Fixed-length bit string
BITVARYING Oength)
Variable-length bit string
NUMERICAL (precision, scale)
DECIMAL (precision, scale)
DEC (precision, scale)
Decimal numbers
FLOAT (precision)
Floating point numbers
REAL
Low-precision floating point numbers
DOUBLE PRECISION
High-precision floating point numbers
DATE
Calendar date
TIME (precision)
Clock time
TIMESTAMP (precision)
Date and Time
INTERVAL
Time interval
Again, different database system vendors use different data types in their
products, introducing one of the practical barriers to the portability of SQL-based
applications.
Determining Nullability
In addition to data types, when designing a database, you also need to determine
the nullability of each column and whether or not a column is indexed and can
434
Structured Query Language (SQL)
contain duplicate values. A nullable column, by the way, can contain nulls.
Nullability is often a source of confusion and is best explained with an example.
Consider a table called Friends that has two columns, Name and Phone
Number. Suppose that when designing the database, you specify that the Name
column is not nullable but the Phone Number column is nullable. This means
that if you know someone named John Spring but do not know his telephone
number, you can still store his name in the Name column without any value in
the Phone Number column.
In the database jargon, you are allowed to enter a Null into the Phone
Number column because the column is nullable.
In other words, you are permitted to not enter a value in the Phone Number
column. However, if you have a telephone number but don't remember whom
that number belongs to, you can't store the number without a name, because the
Name column in not nullable. Note that a Null is not the same as a blank string.
Retrieving Data from a Single Table
You use a SELECT statement to retrieve data from a single table. A SELECT statement has the following syntax:
SELECT clause
FROM clause
[WHERE clause]
[GROUP BY clause]
[HAVING clause]
[ORDER BY clause]
The SELECT clause lists all the data items to be retrieved by the SELECT statement. The data items may be fields from a table, expressions to be calculated as
the database engine performs the query, or constants specifying the same values
to appear in every row of the query result. The list of fields can be replaced by an
asterisk to include all fields in the table. The SELECT clause may contain the keyword DISTINCT to eliminate duplicate values in a column.
The FROM clause lists the tables that contain the data to be retrieved by the
query.
The WHERE clause specifies a condition that must be met by data in the tables
in the FROM clause for the data to be included in the query result. If the WHERE
clause is not present, the query result includes all the rows from the tables.
The GROUP BY clause specifies a summary query. A summary query groups
together similar rows and produces one summary row for each group.
The HAVING clause specifies a condition for the GROUP BY clause.
435
AppendixD
The ORDER BY clause sorts the query result based on data in one or more table
columns. If not present, the query result presents the data in their natural order,
that is, in the order the data are inserted. Data can be sorted in an ascending
order or a descending order. The keyword ASC indicates sorting in an ascending
order whereas the keyword DESC indicates sorting in a descending order. If neither
the keyword ASC nor DESC is present, ASC is assumed.
Examples
All the examples in this section are based on Table D-2.
Table D-2. Employee Information
·······························-
EMPLOYEEID
LASTNAME
FIRSTNAME
NATIONALITY
BIRTHDATE
1
2
3
4
5
6
7
8
9
Sawaki
Burke
Callahan
Lindsay
Buchanan
Lee
Ramanlal
Wong
Gomez
Tomoko
Michael
Laura
Margaret
Steven
Keunho
Prakash
Suzie
Andrez
Japanese
American
American
British
Australian
Korean
Indian
Taiwanese
Mexican
18-Dec-49
02-Mar-58
30-Sep-63
19-0ct-37
04-0ct-55
02-Jun-63
19-Dec-60
09-Jun-58
······························································-
Note that there is a Null value in the BirthDate column for Andrez Gomez in
TableD-2.
The following SQL statement returns all the data in Table D-2:
SELECT *
FROM Employees
The query result looks the same as Table D-2.
The following SQL statement returns the LastName, FirstName, and
Nationality columns in the table:
SELECT LastName, FirstName, Nationality
FROM Employees
The query results are given in Table D-3.
436
Structured Query Language (SQL)
Table D-3. Query Results for LastName, FirstName, and Nationality
LASTNAME
FIRSTNAME
NATIONALITY
Sawaki
Burke
Callahan
Lindsay
Buchanan
Lee
Ram.anlal
Wong
Gomez
Tomoko
Michael
Laura
Margaret
Steven
Keunho
Prakash
Suzie
Andrez
Japanese
American
American
British
Australian
Korean
Indian
Taiwanese
Mexican
The following SQL statement sorts the data by the nationality in ascending alphabetical order:
SELECT LastName, FirstName, Nationality
FROM Employees
ORDER BY Nationality ASC
The query results are displayed in Table D-4.
Table D-4. Query Results by Nationality in Ascending Order
LASTNAME
FIRSTNAME
NATIONALITY
Callahan
Burke
Buchanan
Lindsay
Ram.anlal
Sawaki
Lee
Gomez
Wong
Laura
Michael
American
American
Australian
British
Indian
Japanese
Korean
Mexican
Taiwanese
Steven
Margaret
Prakash
Tomoko
Keunho
Andrez
Suzie
The following SQL statement sorts the data on the nationality and the last
name. The data will first be sorted on the nationality in descending alphabetical
order, and all records that have the same value in the Nationality column will be
sorted on the LastName column in a ascending alphabetical order. The results are
shown in Table D-5.
SELECT LastName, FirstName, Nationality
FROM Employees
ORDER BY Nationality DESC, LastName ASC
437
AppendixD
Table D-5. Query Results Based on Nationality in Descending
Order, and Last Name in Ascending Order
LASTNAME
Wong
Gomez
Lee
Sawaki
Ramanlal
Lindsay
Buchanan
Burke
Callahan
FIRSTNAME
Suzie
Andrez
Keunho
Tomoko
Prakash
Margaret
Steven
Michael
Laura
NATIONALITY
Taiwanese
Mexican
Korean
Japanese
Indian
British
Australian
American
American
The following SQL statement uses the keyword DISTINCT to eliminate duplicates in nationality:
SELECT DISTINCT Nationality
FROM Employees
The previous SQL statement results in the list shown in Table D-6.
Table D-6. Query Results When Eliminating Duplications in Nationality
NATIONALITY
American
Australian
British
Indian
Japanese
Korean
Mexican
Taiwanese
The following SQL statement uses the WHERE clause to select employees whose
nationality is American:
SELECT *
FROM Employees
WHERE Nationality= 'American'
The query results of the previous SQL statement are presented in Table D-7.
438
Structured Query Language (SQLJ
Table D-7. Query Results ofAmerican Nationality-Only Search
EJIIPLOYEEID
LASTNAME
FIRSTNAME
NATIONALITY
BIRTHDATE
2
3
Burke
Callahan
Michael
Laura
American
American
02-Mar-58
30-Sep-63
The following SQL statement selects all records whose BirthDate values are
Null. It uses the IS NULL phrase to test nullability:
SELECT *
FROM Employees
WHERE BirthDate IS NULL
The query results are given in Table D-8.
Table D-8. Query Results ofNull Birthdate Values
EJIIPLOYEEID
LASTNAME
FIRSTNAME
NATIONALITY
9
Gomez
Andrez
Mexican
BIRTHDATE
The following SQL statement selects all records whose BirthDate values are
not Null. It uses the IS NOT NULL phrase to test non-nullability:
SELECT *
FROM Employees
WHERE BirthDate IS NOT NULL
The query results are given in Table D-9.
Table D-9. Query Results for Non-Null Birthdates
EJIIPLOYEEID
1
2
3
4
5
6
7
8
LASTNAME
Sawaki
Burke
Callahan
Lindsay
Buchanan
Lee
Ramanlal
Wong
FIRSTNAME
Tomoko
Michael
Laura
Margaret
Steven
Keunho
Prakash
Suzie
NATIONALITY
Japanese
American
American
British
Australian
Korean
Indian
Taiwanese
BIRTHDATE
18-Dec-49
02-Mar-58
30-Sep-63
19-0ct-37
04-0ct-55
02-Jun-63
19-Dec-60
09-Jun-58
The following SQL statement selects all records whose BirthDate values are
Null and whose Nationality is Japanese:
439
AppendixD
SELECT *
FROM Employees
WHERE BirthDate IS NULL AND Nationality= 'Japanese'
The previous SQL statement returns no records.
The following SQL statement selects all employees whose Employee ID is
greater than 5 and sorts the resulting records by last name alphabetically in
ascending order:
SELECT *
FROM Employees
WHERE EmployeeiD > 5
ORDER BY LastName
The query results are provided in Table D-10.
Table D-1 0. Query Results ofEmployee ID Greater Than 5, Sorted by Last Name
EMPLOYEEID
9
6
7
8
LASTNAME
Gomez
Lee
Ramanlal
Wong
FIRSTNAME
Andrez
Keunho
Prakash
Suzie
NATIONALITY
Mexican
Korean
Indian
Taiwanese
BIRTHDATE
02-Jun-63
19-Dec-60
09-Jun-58
The following SQL statement selects all employees whose employee ID number is not 6. It uses the <> sign to indicate inequality.
SELECT *
FROM Employees
WHERE EmployeeiD <> 6
The query results are given in Table D-11.
Table D-11. Query Results ofEmployee ID Numbers That Are Not 6
EMPLOYEEID
1
2
3
4
5
7
8
9
440
LASTNAME
Sawaki
Burke
Callahan
lindsay
Buchanan
Ramanlal
Wong
Gomez
FIRSTNAME
Tomoko
Michael
Laura
Margaret
Steven
Prakash
Suzie
Andrez
NATIONALITY
Japanese
American
American
British
Australian
Indian
Taiwanese
Mexican
BIRTHDATE
18-Dec-49
02-Mar-58
30-Sep-63
19-0ct-37
04-0ct-55
19-Dec-60
09-Jun-58
Structured Query Language (SQL)
Note that the complete list of comparison tests includes=,<>,<,<=,>, and>=.
The following SQL statement uses BETWEEN • • • AND to select all employees
whose employee ID number is within the range of 3 and 6, inclusive:
SELECT *
FROM Employees
WHERE EmployeeiD BETWEEN 3 AND 6
The query results are provided in Table D-12.
Table D-12. Query Results ofAll Employee ID Numbers within 3 and 6
············································································
..........................................
EMPLOYEEID
3
4
5
6
LASTNAME
Callahan
lindsay
Buchanan
Lee
FIRSTNAME
Laura
Margaret
Steven
Keunho
NATIONALITY
American
British
Australian
Korean
BIRTHDATE
30-Sep-63
19-0ct-37
04-0ct-55
02-Jun-63
The following SQL statement uses the keyword IN to test whether an employee ID value matches one of a list of values:
SELECT *
FROM Employees
WHERE EmployeeiD IN (1, 3, 5)
The query results are given in Table D-13.
Table D-13. Query Results ofEmployee ID Number Matching One ofa List ofValues
EMPLOYEEID
1
3
5
LASTNAME
Sawaki
Callahan
Buchanan
FIRSTNAME
Tomoko
Laura
Steven
NATIONALITY
Japanese
American
Australian
BIRTHOATE
18-Dec-49
30-Sep-63
04-0ct-55
Note that the following SQL statement returns the same query result as the
previous SQL statement:
SELECT *
FROM Employees
WHERE EmployeeiD = 1
OR EmployeeiD = 3
OR EmployeeiD = 5
441
AppendixD
The following SQL statement uses the keyword LIKE to perform pattern
matching on the LastName column. It selects all employees whose last name
starts with a B:
SELECT *
FROM Employees
WHERE LastName LIKE 'B%'
The query results are given in Table D-14.
Table D-14. Query Results ofAll Employees with Last Names Starting with B
EMPLOYEEID
5
2
LASTNAME
FIRSTNAME
NATIONALITY
BIRTHDATE
Buchanan
Burke
Steven
Michael
Australian
American
04-0ct-55
02-Mar-58
Note that in some implementations the percentage sign (%) represents the
wildcard character that matches any sequence of zero or more characters and the
underscore character (_) represents the wildcard character that matches any single character. However, in other implementations, the percentage sign represents
the wildcard that matches any single character and the asterisk (*) represents the
wildcard character that matches any sequence of zero or more characters. You
should consult the documentation of the SQL product you are using.
Inserting New Rows of Data into a Table
You can insert one row of data or multiple rows of data into a table. The information in this section shows you how.
Inserting Single Row
To insert a single row of data into a table, use the following syntax:
INSERT INTO table ((fieldl(, field2(, .•• ]])]
VALUES (valuel[, value2[, .•. ])
For example, the following SQL statement inserts a row into Table D-2, the
original employee data table shown earlier:
INSERT INTO Employees
(EmployeeiD, LastName, FirstName, Nationality)
VALUES
(10, 'Mustafa', 'Ali', 'Iranian')
442
Structured Query Language (SQL)
The database engine automatically assigns a NUll.. value to any column whose
name is missing from the column list in the INSERT statement. Consequently, all
non-nullable fields must be present in the field list.
You may also omit the field list from the INSERT statement. When the field list
is not present, the database engine generates a field list consisting of all fields in
the table, in left-to-right sequence. Therefore, the order of values in the value list
must be correct and all field values must be present.
Inserting Multiple Rows
To insert multiple rows into a table, use the following syntax. The new rows come
from a different table:
INSERT INTO table (field1[, field2[, ... ]])
SELECT clause
FROM clause
WHERE clause
For example, the following SQL statements insert a query result from a table
called NewEmployees to the Employees table (Table D-2):
INSERT INTO Employees (LastName, FirstName, Nationality, BirthDate)
SELECT (Surname, FirstName, Nationality, BirthDate)
FROM NewEmployees
WHERE EmployeeiD IS NOT NULL
Note that the corresponding field names from the source table and the target
table may be different, but the data types must be the same. In the previous SQL
statement, the first field of the target table is LastName and the first field of the
source table is Surname.
Updating Data
You can update the values of one or more columns in selected rows of a table. To
update one or more records, use the following syntax:
UPDATE table
SET newvalue
[WHERE clause]
For example, the following SQL statement changes the value of the Nationality field of the employee with the ID number of 5 in Table D-2:
443
AppendixD
UPDATE Employees
SET Nationality= 'American'
WHERE EmployeeiD = 5
If the WHERE clause is not present, the UPDATE statement modifies all records
in the table. For example, the following SQL statement increases the price by
lO percent for all records in the Products table, Table D-15:
UPDATE Products
SET UnitPrice = UnitPrice * 1.1
Table D-15. Products Information
................................
..................................................
PRODUCTID
1
2
3
4
5
6
PRODUCTNAME
Tibani
As tea
Ranjabee
Pakistani Sweet
Chef Mix
Equippt
QUANTITYPERUNIT
10 boxes x 20 bags
24 - 12 oz bottles
12 - 550 ml bottles
48-6 ozjars
36 boxes
12-8 ozjars
UNITPRICE
$11.00
$9.00
$12.00
$22.00
$21.35
$25.00
UNITSINSTOCK
34
17
13
34
0
120
UNITSONORDER
0
40
70
0
10
0
Deleting Rows of Data
To delete rows of data from a table, use the following syntax:
DELETE
FROM table
[WHERE clause]
For example, the following SQL statement deletes records in the Employees
table whose nationality is Fijian:
DELETE
FROM Employees
WHERE Nationality= 'Fijian'
If the WHERE clause is not present, all records in the table will be deleted.
444
Structured Query Language (SQLJ
Summary Queries
With SQL you can summarize data from the database through a set of column
functions. A column function takes an entire column of data as its argument and
produces a single data item that summarizes the column. The six column
functions are
• SUM() :Calculates the total of a column of type numeric.
• AVG(): Computes the average value in a column of type numeric.
• MIN (): Finds the smallest value in a column of type numeric.
• MAX(): Finds the largest value in a column of type numeric.
• COUNT (): Counts the number of values in a column.
• COUNT(*): Counts the number of rows of the query result.
According to the ANSI/ISO SQL standard, NULL values in a column are
ignored by the SUM(), AVG(), MIN(), MAX(), and COUNT() functions. However,
implementations by RDBMS vendors might be different from the standard.
Examples
The following SQL statement computes the sum of the order value, the average of
the order value, the minimum order value, the maximum order value, and the
number of values in the OrderValue column in the Orders table, Table D-16:
SELECT SUM(OrderValue), AVG(OrderValue), MIN(OrderValue), MAX(OrderValue),
COUNT(OrderValue)
FROM Orders
Table D-16. Orders Information
ORDERID
CUSTOMERID
1
1
2
3
4
5
1
2
2
2
PRODUCTID
2
3
4
3
6
QUANTITY
3
5
4
5
66
ORDERDATE
01/01/00
02/02/00
03/03/00
04/04/00
05/05/00
445
AppendixD
The following SQL statement returns the number of rows in the Table D-2:
SELECT COUNT{*)
FROM Employees
Summary of a Group
The previous examples compute summaries of data in the whole table. It is also
possible to obtain summaries of a group of rows using the GROUP BY clause and
column functions.
For example, the following SQL statement groups orders by customers and
gives the summaries of each group:
SELECT CustomeriD, Sum{OrderValue) AS Sum, Avg{OrderValue) AS Average,
Min{OrderValue) AS Minimum, Max{OrderValue) AS Maximum, Count{OrderValue) AS Count
FROM Orders
GROUP BY CustomeriD
The query results look similar to Table D-17.
Table D-17. Query Results ofGrouping Orders by Customer
CUSTCitERID
1
SUM
2,235.00
2
23,990.00
AVERAGE
MINIMUM
MAXIMUM
1,117.50
7,996.67
890.00
1,345.00
2
890.00
22,000.00
3
COUNT
Retrieving Data from Multiple Tables
To retrieve data from more than one table, you can either use the keyword UNION
or create a join between two tables.
UNION
The keyword UNION can be used to retrieve data from more than one table. Data
from the second or next table are appended to the query result from the first
table. Each table must return the same number of fields and each corresponding
field from the source tables must have the same data type. If you retrieve data
from two tables and the first field from the first table is an Integer, the first field
from the second table must also be an Integer.
446
Structured Query Language (SQL)
The following example retrieves data from the Employees table (Table D-2)
and another table called NewEmployees, and orders the query result by last
name:
SELECT LastName, FirstName, BirthDate
FROM Employees
UNION
SELECT Surname, FirstName, BirthDate
FROM NewEmployees
WHERE Hired = True
ORDER BY LastName ASC
Joins
A join is the query result containing data from two or more tables in which each
table in the join has a matching column. When using joins, there is a possibility
that tables in a join have fields with the same name. To avoid confusion as to
which table a field comes from, each field in the field list of the SELECT clause is
prefixed by its table name and a period, such as tablename. fieldname.
Because repeating the table name for each field can make the statement
unnecessarily long, you are allowed to use an alias for a table name. Table name
aliases are defined in the FROM clause. For instance, this following SQL statement
uses table name aliases:
SELECT A.LastName, A.FirstName, P.Publisher
FROM Authors A, Publishers P
There are several types of joins, including a(n):
• inner join or equi-join
• outerjoin
• selfjoin
The examples in this section use the information in Tables D-15, D-16,
andD-18.
Inner Join
An inner join is a join in which the values in the columns being joined are compared using a comparison operator. In the SQL2 standard, inner joins can be
447
AppendixD
specified in either the FROM or WHERE clause. This is the only type of join that SQI2
supports in the WHERE clause. Inner joins specified in the WHERE clause are known
as old-style inner joins.
Inner joins return rows only when there is at least one row from both tables
that matches the join condition. Inner joins eliminate the rows that do not match
with a row from the other table.
The following SQL statement retrieves orders information from Table D-16.
and the customer details for each order from Table D-18:
SELECT O.OrderiD, O.OrderDate, C.CompanyName, C.Address, C.City, C.Country
FROM Orders 0 INNER JOIN Customers C
ON O.CustomeriD = C.CustomeriD
The query results from the previous SQL statement are shown in Table D-19.
The previous SQL statement returns the same results as the following SQL
statement:
SELECT O.OrderiD, O.OrderDate, C.CompanyName, C.Address, C.City, C.Country
FROM Orders 0, Customers C
WHERE O.CustomeriD = C.CustomeriD
The SQL statement that creates the join can be filtered further, such as with
the following statement to retrieve orders from U.K. customers only:
SELECT O.OrderiD, O.OrderDate, C.CompanyName, C.Address, C.City, C.Country
FROM Orders 0 INNER JOIN Customers C
ON O.CustomeriD = C.CustomeriD
WHERE C.Country = 'UK'
Or, the following statement can be used to perform the same task:
SELECT O.OrderiD, O.OrderDate, C.CompanyName, C.Address, C.City, C.Country
FROM Orders 0, Customers C
WHERE O.CustomeriD = C.CustomeriD
AND C.Country = 'UK'
The following SQL statement retrieves data from Tables D-15, D-16, and D-18:
SELECT O.OrderiD, P.ProductName, C.CompanyName, C.Address, C.City, C.Country
FROM (Orders 0 INNER JOIN Customers C ON O.CustomeriD = C.CustomeriD)
INNER JOIN Products P ON
O.ProductiD = P.ProductiD
The query results are provided in Table D-20.
448
t
~
COMPANY NAME
Kedai Ikan Masin Lian Hin
Muriels Supermarket
Crownland warehouse
ADDRESS
23 Jalan Gong Kapas
890 Cromwell Rd
377 Langley Street
CITY
Kuala Lumpur
London
Vancouver
POSTAL CODE
58102
SW72EH
V6T2E7
COUNTRY
Malaysia
UK
Canada
PHONE
60-3-6265431
(171) 555-7908
604-2216869
ORDERDATE
01/01/00
02/02/00
03/03/00
04/04/00
05/05/00
COMPANY NAME
Kedai lkan Masin Lian Hin
Kedai Ikan Masin Lian Hin
Muriels Supermarket
Muriels Supermarket
Muriels Supermarket
ADDRESS
23 Jalan Gong Kapas
23 Jalan Gong Kapas
890 Cromwell Rd
890 Cromwell Rd
890 Cromwell Rd
ORDERID
1
2
4
3
5
PRODUCTNAME
Astea
Ranjabee
Ranjabee
Pakistani Sweet
Equippt
COMPANY NAME
Kedai Ikan Masin Lian Hin
Kedai Ikan Masin Lian Hin
Muriels Supermarket
Muriels Supermarket
Muriels Supermarket
ADDRESS
23 Jalan Gong Kapas
23 Jalan Gong Kapas
890 Cromwell Rd
890 Cromwell Rd
890 Cromwell Rd
..........................................................................................................................................................................................................................................................
Table D-20. Query Results ofRetrieving Data from Three Tables
ORDERID
1
2
3
4
5
CITY
Kuala Lumpur
Kuala Lumpur
London
London
London
CITY
Kuala Lumpur
Kuala Lumpur
London
London
London
COUNTRY
Malaysia
Malaysia
UK
UK
UK
COUNTRY
Malaysia
Malaysia
UK
UK
UK
...................................................................................................................................................................................................................................................................................................................................................................................................................................................
Table D-19. Query Results ofRetrieving Orders Information from One Table and Customer Information from Another Table
CUSTOMERID
1
2
3
............................................................................................
Table D-18. Customer Information
FAX
60-3-6265433
(171) 555-3750
604-2216769
AppendixD
Outer Joins
Outer joins return all rows from at least one of the tables or views mentioned
in the FROM clause, as long as those rows meet any WHERE or HAVING search conditions.
You can have a left outer join or a right outer join. In a left outer join, all rows
are retrieved from the left table referenced with a left outer join. In a right outer
join, all rows from the right table referenced in a right outer join.
The following SQL statement retrieves all customers and their orders from
Table D-16 and D-18. Customers who don't have orders are still included in the
query result, but their orders will have NULL values:
SELECT C.CompanyName, O.OrderiD, O.OrderDate
FROM Customers C LEFT OUTER JOIN Orders 0
ON C.CustomeriD = O.CustomeriD
The query results are given in Table D-21.
Table D-21. Results ofRetrieving All Customers and Their Orders
COMPANY NAME
ORDERID
Kedai Ikan Masin Lian Hin
Kedai Ikan Masin Lian Hin
Muriels Supermarket
Muriels Supermarket
· Muriels Supermarket
Crownland warehouse
2
3
4
5
1
ORDERDATE
01/01/00
02/02/00
03/03/00
04/04/00
05/05/00
Note that the previous SQL statement returns the same results as the following SQL statement:
SELECT C.CompanyName, O.OrderiD, O.OrderDate
FROM Orders 0 RIGHT OUTER JOIN Customers C
ON C.CustomeriD = O.CustomeriD
Self Joins
Selfjoins refer to relationships that a table has with itself. This type of join,
for example, occurs in the Table D-22, which has a ReportTo field as well as an
EmployeeiD field. The ReportTo field is for storing the ID of each employee's
manager. Because managers are also employees, retrieving the list of employees
and their managers involves a relationship of the Employees table with itself. As
an example, consider Table D-22.
450
Structured Query Language (SQLJ
Table D-22. Employee Information Requiring Selfjoins
EMPLOYEEID
1
2
3
4
5
6
7
8
9
LASTNAME
Sawaki
Burke
Callahan
Lindsay
Buchanan
Lee
Rarnanlal
Wong
Gomez
FIRSTNAME
Tomoko
Michael
Laura
Margaret
Steven
Keunho
Prakash
Suzie
Andrez
NATIONALITY
Japanese
American
American
British
Australian
Korean
Indian
Taiwanese
Mexican
BIRTHDATE
18-Dec-49
02-Mar-58
30-Sep-63
19-0ct-37
04-0ct-55
02-Jun-63
19-Dec-60
09-Jun-58
REPORTTO
1
2
1
2
2
4
4
2
In Table D-22, there are two managers, Michael Burke and Margaret Lindsay.
Both report to the director, Tomoko Sawaki.
The following SQL statement returns the list of employees and their immediate boss and sorts the records by employee last name:
SELECT A.LastName AS Emp1oyeeLastName, A.FirstName AS EmployeeFirstName,
B.LastName AS BossLastName, B.FirstName AS BossFirstName
FROM Employees A LEFT OUTER JOIN Employees B
ON A.ReportTo = B.EmployeeiD
ORDER BY A.LastName ASC
The query results are given in Table D-23.
Table D-23. Query Results ofReturning a List ofEmployees and Their
Immediate Boss
EMPLOYEELASTNAME
Buchanan
Burke
Callahan
Gomez
Lee
Lindsay
Rarnanlal
Sawaki
Wong
EMPLOYEEFIRSTNAME
Steven
Michael
Laura
Andrez
Keunho
Margaret
Prakash
Tomoko
Suzie
BOSSLASTNAME
Burke
Sawaki
Burke
Burke
Burke
Sawaki
Lindsay
BOSSFIRSTNAME
Michael
Tomoko
Michael
Michael
Michael
Tomoko
Margaret
Lindsay
Margaret
......... . ......................................................................................
························~
451
AppendixD
Data Definition
Data definition is concerned with changes to the structure of a database. This
section shows you how to use SQL statements to change the structure of a
database object.
Creating a Table
You can use the following syntax to create a table:
CREATE TABLE table
(field1 type [(size)] [NOT NULL] [index1]
[, field2 type [(size)] [NOT NULL] [index2]
[,
... ]]
[, CONSTRAINT multifieldindex [, ••• ]])
Every RDBMS has its own data types, so you should consult your RDBMS documentation for the supported data types.
The following example creates a table called Products in a Microsoft SQL
Server 7.0 database with the following four fields:
• ProductiD (primary key, integer, non-nullable)
• ProductName (not indexed, varchar(25), non-nullable)
• UnitPrice (not indexed, small money, non-nullable)
• Description (not indexed, varchar(50), nullable)
Here's the syntax:
CREATE TABLE Products
(ProductiD INTEGER PRIMARY KEY,
ProductName VARCHAR(25) NOT NULL,
UnitPrice SMALLMONEY NOT NULL,
Description VARCHAR(SO) NULL)
Dropping a Table
You can drop a table using the following syntax:
DROP TABLE tablename
452
Structured Query Language (SQL)
For example, the following SQL statement deletes the Products table:
DROP TABLE Products
Altering a Table
You can alter the structure of a table by adding or dropping a column, for
example.
To add a column, use the following syntax:
ALTER TABLE tablename ADD column-definition
For example, the following SQL statement adds a new nullable column of type
integer called SupplieriD to the Products table:
ALTER TABLE Products
ADD SupplieriD Integer NULL
To drop a column, use the following syntax:
ALTER TABLE tablename DROP column-name
The following SQL statement drops the SupplieriD column from the Products
table:
ALTER TABLE Products DROP SupplieriD
However, in Microsoft SQL Server you must use the word COLUMN to drop a
column. Therefore, the previous SQL statement must be written like this:
ALTER TABLE Products DROP COLUMN SupplieriD
453
APPENDIX E
COO for NTS Objects
THIS APPENDIX CONTAINS INFORMATION ON the properties and methods for the
Collaboration Data Objects for Wmdows NT Server (COO for NTS) Library objects.
Table E-1 summarizes each object's properties and methods.
Table E-1. CDO Properties and Methods
OBJECT
PROPERTIES
METIIOOS
AddressEntry
Address, Application, Class,
Name, Parent, Session, Type
Application, Class, ContentBase,
ContentiD, ContentLocation,
Name, Parent, Session,
Source, Type
Application, Class, Count,
Item, Parent, Session
Application, Class, Messages,
Name, Parent, Session
Application, Attachments,
Class, ContentBase, ContentiD,
ContentLocation, HTMIText,
Importance, MessageFormat,
Parent, Recipients, Sender,
Session, Size, Subject, Text,
TimeReceived, TimeSent
Application, Class, Count,
Item, Parent, Session
(none)
Attachment
Attachments collection
Folder
Message
Messages collection
NewMail
Recipient
Recipients collection
Bee, Body, BodyFormat, Cc,
ContentBase, ContentLocation,
From, Importance, MailFormat,
Subject, To, Value, Version
Address, Application, Class,
Name, Parent, Session, Type
Application, Class, Count, Item,
Parent, Session
Delete, ReadFromFile,
WriteToFile
Add, Delete
(none)
Delete, Send
Add, Delete, GetFirst,
GetLast, GetNext,
GetPrevious
AttachFile, AttachURL,
Send, SetLocaleiDs
Delete
Add, Delete
455
AppendixE
Table E-1. Continued
OBJECT
Session
PROPERTIES
METHODS
Application, Class, lnbox,
GetDefaultFolder, Logoff,
MessageFormat, Name, Outbox, LogonSMTP, SetLocaleiDs
Parent, Session, Version
This appendix is organized by object, with the objects listed alphabetically.
For each object a reference documentation for each property or method that belongs to the object is listed. The properties and methods are also organized alphabetically.
Properties Common to All COO
for NTS Library Objects
All COO for NTS Library objects except the NewMail object expose the properties
Application, Class, Parent, and Session. The Application and Session properties
have the same values for all objects within a given session. The Parent property
indicates the immediate parent of the object, and the Class property is an integer
value that identifies the COO for NTS Library object.
The NewMail object is self-contained and does not expose any of these
properties.
All four of these common properties have read-only access in all objects. Note
that for the Session object, the Parent and Session properties are assigned the
value Nothing. The Session object represents the highest level in the COO for NTS
Library object hierarchy and has no parent.
Properties
Application
The read-only Application property returns the name of the active application,
namely the COO for NTS Library.
Syntax
object.Application
Data Type
String
456
COO for NTS Objects
Remarks
The Application property always contains the string Collaboration Data Objects
for NTS version 1.2.
The version number of the CDO for NTS Library is available through the
Session object's Version property.
Class
The read-only Class property returns the object class of the object.
Syntax
object.Class
Data7ype
Long
Remarks
The Class property contains a numeric constant that identifies the CDO for NTS
Library object. The possible values for the Class property are defined in Table E-2.
Table E-2. Class Property Values
CDO FOR NTS LIBRARY OBJECT
AddressEntry
Attachment
Attachments collection
Folder
Message
Messages collection
Recipient
Recipients collection
Session
CLASS VALUE
8
5
18
2
3
16
4
17
0
TYPE LIBRARY CONSTANT
CdoAddressEntry
CdoAttachment
CdoAttachments
CdoFolder
CdoMsg
CdoMessages
CdoRecipient
CdoRecipients
CdoSession
Parent
The read-only Parent property returns the parent of the object.
457
AppendixE
Syntax
Set objParent = object.Parent
Data Type
Object
Remarks
The Parent property in the CDO for NTS Library returns the immediate parent of
an object. The immediate parent for each object is shown in Table E-3.
Table E-3. Immediate Parent for Each NTS Library Object
COO FOR NTS LIBRARY OBJECT
AddressEntry
Attachment
Attachments collection
Folder
Message
Messages collection
Recipient
Recipients collection
Session
IMMEDIATE PARENT IN OBJECT HIERARCHY
Message
Attachments collection
Message
Session
Messages collection
Folder, including Inbox or Outbox
Recipients collection
Message
Set to Nothing
The Parent property represents the immediate parent of the object, rather
than the logical parent. For example, a folder contains a Messages collection,
which contains Message objects. The Parent property for a message is the immediate parent, the Messages collection, rather than the logical parent, the Folder
object.
The Session object represents the highest level in the hierarchy of CDO for
NTS Library objects and its Parent property is set to Nothing. The Address Entry
object does not have a true hierarchical parent but can only be obtained through
the Sender property of a Message object. Its Parent property returns the Message
object.
Session
The read-only Session property returns the top-level Session object associated
with the specified CDO for NTS Library object.
458
COO for NTS Objects
Set objSession = object.Session
Data'JYpe
Object (Session)
Remarks
The Session object represents the highest level in the COO for NTS Library object
hierarchy. If you invoke the Session property of a Session object, it returns the
same Session object.
AddressEntry Object
The Address Entry object defines addressing information that is valid for a given
messaging system.
Properties
Address
The Address property specifies the messaging address of an address entry. Readonly.
Synttrx
objAddressfntry.Address
String
Remarks
The Address Entry object's Address property contains a unique string that identifies a messaging user and provides routing information for messaging systems.
The format of the address string is specific to each messaging system.
459
Appendix£
Name
The Name property returns the display name or alias of the AddressEntry object as
a string. Read-only.
Syntax
objAddressEntry.Name
The Name property is the default property of an Address Entry object, meaning that
objAddressEntry is syntactically equivalent to objAddressEntry .Name in Microsoft
Visual Basic code.
Data Type
String
Type
The Type property specifies the address type, such as SMTP. Read-only.
Syntax
objAddressEntry.Type
Data Type
String
Remarks
The address type is usually a tag referring to the messaging system that routes
messages to this address, such as SMTP. The Type property always returns SMTP
in the current version of COO for NTS.
Attachment Object
The Attachment object represents a file or message that is an attachment of amessage.
460
COO for NI'S Objects
Properties
Content Base
The ContentBase property returns the Content-Base header of a MIME
(Multipurpose Internet Mall Extensions) message attachment. Read-only.
Syntax
objAttach.ContentBase
Data Type
String
Remarks
The ContentBase property is used for MHTML (MIME HTML) support. It represents the Content-Base header for the appropriate MIME body part.
ContentiD
The ContentiD property returns the Content-ID header of a MIME (Multipurpose
Internet Mall Extensions) message attachment. Read-only.
objAttach.ContentiD
Data Type
String
Remarks
The ContentiD property is used for MHTML (MIME HTML) support. It represents
the Content-ID header for the appropriate MIME body part.
The COO for NTS Library does not generate Content-ID headers for outgoing
messages or attachments. This property is provided to inspect an incoming message for Content-ID headers.
461
AppendixE
Content Location
The Contentlocation property returns the Content-Location header of a MIME
(Multipurpose Internet Mail Extensions) message attachment. Read-only.
Syntax
objAttach.Contentlocation
Data'I)rpe
String
Remarks
The Contentlocation property is used for MHTML (MIME HTML) support. It
represents the Content-Location header for the appropriate MIME body part.
Name
The Name property returns or sets the display name of the Attachment object as
a string. Read/write (read-only for an attachment on a message in the Inbox).
Syntax
objAttach.Name
Data'I)rpe
String
Source
The Source property returns or sets information specifying the location of the
data for the attachment. Read/write (read-only for an attachment on a message in
thelnbox).
Syntax
objAttach.Source
462
COO for NTS Objects
Data Type
String or Object (Message)
Remarks
The Source property is not used for CdoFileData attachments. For
CdoEmbeddedMessage attachments, the Source property returns or sets the Message
object to be embedded. An embedded message is copied into the attachment at
creation time.
NOTE: The Source property is a string except when it returns the source ofa
CdoEmbeddedMessage attachment.
The return value or setting of the Source property depends on the value of the
Type property, as described in the Table E-4.
Table E-4. Source Property Given the Type Property Value
TYPE PROPERTY
CdoFileData
CdoEmbeddedMessage
SOURCE PROPERTY
Not used; contains an empty string. The source for this
type of attachment must be specified in the call to the
Add method.
Specifies the Message object to be embedded.
Type
The Type property describes the attachment type. Read/write (read-only for an attachment on a message in the lnbox).
Syntax
objAttach.Type
Data Type
Long
Remarks
The attachment types supported by the Type property are shown in Table E-5.
463
Appendix£
Table E-5. Type Property Attachment Types
TYPE PROPERTY
VALUE
DESCRIPTION
CdoFileData
1
CdoEmbeddedMessage
4
Attachment is the contents of a file. (Default
value.)
Attachment is an embedded message.
The value of the Type property determines the valid values for the Source property. Consequently, you must set Type before setting Source in order for the
ReadFromFile and WriteToFile methods to work correctly.
Methods
Delete
The Delete method removes the Attachment object from the Attachments
collection.
Syntax
objAttach.Delete
ReadFromFile
The ReadFromFile method loads the contents of an attachment from a file.
Syntax
objAttach.ReadFromFile(fileName)
Parameter
fileName (required) String: The full path and file name to read from, for example:
C:\DOCUMENT\BUDGET.XLS.
WriteToFile
The WriteToFile method saves the attachment to a file in the file system.
464
CDO for NTS Objects
Syntax
objAttach.WriteToFile(fileName)
Parameter
fileName (required) String: The full path and file name for the saved attachment,
forexar.nple:C:\DOCUMENT\BUDGET.XLS.
Attachments Collection
The Attachments collection contains zero or more Attachment objects.
Properties
Count
The Count property returns the number of Attachment objects in the collection.
Read-only.
Syntax
collAttachments.Count
Long
Item
The Item property returns a single Attachment object from the Attachments
collection. Read-only.
Syntax
collAttachments.Item(index)
Parameter
index Long. An integer ranging from 1 to collAttachments. Count.
465
Appendix£
Data Type
Object (Attachment)
Methods
Add
The Add method creates and returns a new Attachment object in the Attachments
collection.
Syntax
Set objAttach = collAttachments.Add( [name] [, type] [, source] [, Content
Location] [, ContentBase] )
Parameters
collAttachments (required): The Attachments collection object.
name (optional) String: The display name of the attachment. The default value
is an empty string. To allow a user to click the attachment that appears in the
message and activate an associated application, supply the full file name, including the file extension.
type (optional) Long: The type of attachment; either CdoFileData or
CdoEmbeddedMessage. The default value is CdoFileData.
source (optional) String or Object: The path and file name of the file containing the data for the attachment, or the Message object to be embedded. The path
and file name must be in the appropriate format for the attachment type, specified by the type parameter. The default value is an empty string.
Content Location (optional) String: The content location header for the appropriate body part of a MIME message attachment.
ContentBase (optional) String: The content base header for the appropriate
body part of a MIME message attachment.
Delete
The Delete method removes all the Attachment objects from the Attachments
collection.
466
CDO for NTS Objects
Syntax
collAttachments.Delete
Folder Object
The Folder object represents a folder or container in a message store.
Properties
Messages
The Messages property returns a Messages collection object within the folder.
Read-only.
Syntax
objFolder.Messages
Data Type
Object (Messages collection).
Name
The Name property returns the name of the Folder object as a string. Read -only.
Syntax
obj Folder. Name
Data Type
String
Message Object
The Message object represents a single message, item, document, or form in a
folder.
467
AppendixE
Properties
Attachments
The Attachments property returns a single Attachment object or an Attachments
collection object. Read-only.
Set collAttachments = objMessage.Attachlents
Set objAttach = objMessage.Attachlents(index)
index Long: Specifies the number of the attachment within the Attachments collection. Ranges from 1 to the value specified by the Attachments collection's Count
property.
Retum Values
collAttachments Object: An Attachments collection object.
objAttach: On successful return, contains the new Attachment object.
DlltiiType
Object (Attachment or Attachments collection)
ContentBase
The Content Base property returns or sets the Content-Base header of a MIME
(Multipurpose Internet Mail Extensions) message body. Read/write (read-only
for a message in the Inbox).
objMessage.ContentBase
String
468
CDO for NTS Objects
ContentiD
The ContentiD property returns or sets the Content-ID header of a MIME
(Multipurpose Internet Mail Extensions) message body. Read-only.
Syntax
objAttach.ContentiD
Data Type
String
Content Location
The ContentLocation property returns or sets the Content-Location header of a
MIME (Multipurpose Internet Mail Extensions) message body. Read/write (readonly for a message in the Inbox).
Syntax
objMessage.ContentLocation
Data Type
String
HTMLText
The HTMLText property returns or sets the Hypertext Markup Language (HTML)
representation of the message's text. Read/write (read-only for a message in the
Inbox).
Syntax
objMessage.HTMLText
Data Type
Object (!Stream) or String
469
AppendixE
Importance
The Importance property returns or sets the importance of the message.
Read/write (read-only for a message in the Inbox).
objMessage.IMpOrtance
Long
The possible values for the Importance property are are listed in Table E-6.
Table E-6. Important Property Values for Message Object
CONSTANT
VALUE
DESCRIPTION
CdoLow
CdoNormal
CdoHigh
0
Low importance
Normal importance (default)
High importance
1
2
MessageFormat
The write-only Message Format property sets the encoding format of the message.
objMessage.MessageFor.at
Long
Remarks
The MessageFormat property determines how a message is encoded. The possible
values for the MessageFormat property are shown in Table E-7.
470
CDO for NfS Objects
Table E-7. MessageFormat Property Values for the Message Object
MESSAGEFORMAT SETTING
CdoMime
CdoText
VALUE
0
1
DESCRIPTION
The message is in MIME format.
The message is in uninterrupted plain text.
The MessageFormat property is not used on incoming messages in the Inbox.
Recipients
The Recipients property returns a single Recipient object or a Recipients collection object. Read-only.
Syntax
Set collRecips = objMessage.Recipients
Set objRecip = objMessage.Recipients(index)
Parameters
collRecips Object: A Recipients collection object.
objMessage Object: The Message object.
objRecip Object: A single Recipient object.
index Long: Specifies the number of the recipient within the Recipients collection. Ranges from 1 to the value specified by the Recipients collection's Count
property.
Data Type
Object (Recipient or Recipients collection)
Sender
The Sender property returns the sender of a message as an Address Entry object.
Read-only.
Syntax
Set objAddrEntry = objMessage.Sender
471
AppendixE
Return Value
objAddrEntry Object: The returned Address Entry object that represents the
messaging user that sent the message.
Data Type
Object (AddressEntry)
Size
The Size property returns the approximate size in bytes of the message.
Read-only.
Syntax
objMessage.Size
Data Type
Long
Subject
The Subject property returns or sets the subject of the message as a string.
Read/write (read-only for a message in the Inbox).
Syntax
objMessage.Subject
The Subject property is the default property of a Message object, meaning that
objMessage is syntactically equivalent to objMessage. Subject in Microsoft Visual
Basic code.
Data Type
String
472
CDO for NTS Objects
Text
The Text property returns or sets the plain text representation of the message's
text. Read/write (read-only for a message in the Inbox).
objMessage.Text
Object (!Stream) or String
TimeReceived
The TimeReceived property sets or returns the date and time a message is received
as a vbDate variant data type. Read-only.
Syntax
objMessage.TimeReceived
Data'l)tpe
Variant (vbDate format)
Time Sent
The TimeSent property sets or returns the date and time the message was sent as a
vbDate variant data type. Read-only.
Syntax
objMessage.TimeSent
Data'l)tpe
Variant (vbDate format)
473
AppendixE
Methods
Delete
The Delete method removes the Message object from the Messages collection.
Syntax
objMessage.Delete
Send
The Send method sends the message to the recipients through the messaging
system.
Syntax
objMessage.Send
Messages Collection
The Messages collection contains zero or more Message objects.
Properties
Count
The Count property returns the number of Message objects in the collection, or a
very large number if the exact count is not available. Read-only.
Syntax
collMessages.Count
Data Type
Long
474
COO for NTS Objects
Item
The Item property returns a single Message object from the Messages collection.
Read-only.
collMessages.Ita.(index)
Parameter
index: A long integer ranging from 1 to the size of the Messages collection.
Object (Message)
Methods
Add
The Add method creates and returns a new Message object in the Messages
collection.
Syntax
Set objMessage
= collMessages.Add{ [subject] [, text] [, importance] )
collMessages (required): The Messages collection object.
subject (optional) String: The subject line for the message.
text (optional) !Stream object or String: The text of the message.
importance (optional) Long: The importance associated with the message.
RetumValue
objMessage: On successful return, represents the new Message object added to the
collection.
475
AppendixE
Delete
The Delete method removes all the Message objects from the Messages
collection.
Syntax
collMessages.Delete
Get First
The Get First method returns the first Message object in the Messages collection. It
returns Nothing if no first object exists.
Syntax
Set objMessage = collMessages.GetFirst
Return Value
objMessage: On successful return, represents the first Message object in the
collection.
Get Last
The Getlast method returns the last Message object in the Messages collection. It
returns Nothing if no last object exists.
Syntax
Set objMessage = collMessages.Getlast
Return Value
objMessage: On successful return, represents the last Message object in the
collection.
Get Next
The GetNext method returns the next Message object in the Messages collection. It
returns Nothing if no next object exists, for example if already positioned at the
end of the collection.
476
COO for NTS Objects
Set objMessage = collMessages.GetNext
Return Value
objMessage: On successful return, represents the next Message object in the collection.
GetPrevious
The GetPrevious method returns the previous Message object in the Messages collection. It returns Nothing if no previous object exists, for example, if the pointer is
already positioned at the beginning of the collection.
Set objMessage = co11Messages.GetPrevious
RetumValue
objMessage: Upon successful return, represents the previous Message object in the
collection.
NewMail Object
The NewMail object provides for sending a message with very few lines of code.
Properties
Bee
The Bee property adds to the list of blind copy (Bee) recipients for the NewMail object. Write-only.
objNewMail.Bcc
Data7ype
String
477
AppendixE
Body
The Body property sets the text of the NewMail object. Write-only.
Syntax
objNewMail. Body
Data1jrpe
Object (IStream) or String
BodyFormat
The BodyFormat property sets the text format of the NewMail object. Write-only.
Syntax
objNewMail.BodyFormat
Data1jrpe
Long
Remarks
BodyFormat can contain exactly one of the values listed in Table E-8.
Table E-8. BodyFormat Values for the NewMail Object
BODYFORMAT SETTING
CdoBodyFonnatl111JL
VALUE
CdoBodyFonnatText
1
0
DESCRIPTION
The Body property is to include Hypertext
Markup Language (HJlJL).
The Body property is to be exclusively in plain
text (default value).
Cc
The Cc property adds to the list of copy (Cc) recipients for the NewMail object.
Write-only.
478
CDO for NTS Objects
Syntax
objNewMoil. Cc
Data7ype
String
ContentBase
The ContentBase property sets a base for all URLs relating to the NewMail object's
message body. Write-only.
Syntax
objNewMail.ContentBase
Data'JYpe
String
Content Location
The Contentlocation property sets an absolute or relative path for all URLs relating to the NewMail object's message body. Write-only.
Syntax
objNewMail.Contentlocation
Data7ype
String
From
The From property sets the full messaging address to be used for the sender of the
NewMail object. Write-only.
479
AppendixE
Syntax
objNewftlail. Fr011
Data Type
String
Importance
The Importance property sets the importance associated with the N~il object.
Write-only.
Syntax
objNewHoil.I.,artance
Long
The possible values for the Importance property are listed in Thble E-9.
Table E-9. Importance property values for NewMail object
CONSTANT
CdoLow
CdoNormal
CdoHigh
VALUE
0
1
2
DESCRIPTICII
Low importance
Normal importance (default)
High importance
Mail Format
The Mail Format property sets the encoding for the NewMail object. Write-only.
Syntax
objNewMail.MailFor.at
480
CDO for NTS Objects
Long
Remarks
Mail Format can contain exactly one of the values shown in Table E-10.
Table E-1 0. MailFormat Values for the NewMail Object
CdoMailFormatMime
VALUE
0
CdoMailFormatText
1
MAILFORMAT SETTING
DESCRIPTION
The NewMail object is to be in MIME
format.
The NewMail object is to be in
uninterrupted plain text (default value).
Subject
The Subject property sets the subject of the NewMan object as a string. Write-only.
Syntax
objNewHail.Subject
Data Type
String
To
The To property adds to the list of principal (To) recipients for the NewMail object.
Write-only.
Syntax
objNewHail.To
Data Type
String
481
AppendixE
Value
The Value property sets the value and contents of an additional header for the
NewMail object. Write-only.
objNeMMail.Value(header) = strHdrValue
header: A character string containing the name of the header to be added.
Setting
strHdrValue: A character string containing the value of the header to be added.
String
Version
The Version property returns the version of the CDO for NTS library. Read-only.
objNewMail.Version
String
Methods
AttachFile
The Attach File method adds an attachment to the message by reading a file.
objNewMail.AttachFile(Source [. FileName] [, EncodingMethod] )
482
CDO for NTS Objects
Parameters
Source (required) !Stream object or String: The full path and file name of the file
to be attached to the message, or a pointer to an !Stream object containing the
file data.
FileName (optional) String: The file name to appear in the attachment's placeholder in the message. If FileName is not supplied, the file name from the Source
parameter is used.
EncodingMethod (optional) Long: The manner of encoding the attachment. The
possible values are shown in Table E-11.
Table E-11. EncodingMethod Values for AttachFile
ENCODINGNETHOD SETTING
CdoEncodingUUencode
VALUE
CdoEncodingBase64
1
0
DESCRIPTION
The attachment is to be in UUEncode format
(default).
The attachment is to be in base 64 format.
AttachURL
The AttachURL method adds an attachment to the message and associates a
Uniform Resource Locator (URL) with the attachment.
Syntax
objNewHail.AttachURL(Source, ContentLocation [, ContentBase] [, EncodingMethod] )
Parameters
Source (required) !Stream object or String: The full path and file name of the resource to be attached to the message, or a pointer to an !Stream object containing
the file data.
ContentLocation (required) String: The absolute or relative prefix for the URL that
the rendering client can use to reference this attachment.
Content Base (optional) String: A base for the URL used to reference this attachment.
EncodingMethod (optional) Long: The manner of encoding the attachment. The
possible values are shown in Table E-12.
483
AppendixE
Table E-12. EncodingMethod Values for AttachURL
VALUE
DESCRIPTION
CdoEncodingUUencode
0
CdoEncodingBase64
1
The attachment is to be in UUEncode format
(default).
The attachment is to be in base 64 format.
ENCODINGMETHOD SETIING
Send
The Send method sends the NewMan object to the specified recipients.
objNewMail.Send( [From] [, To] [, Subject] [, Body] [, Importance] )
Parameters
From (optional) String: The full messaging address to be identified as the sender.
To (optional) String: A list of full messaging addresses of recipients. The individual
recipient addresses are separated by semicolons.
Subject (optional) String: The subject line for the message.
Body (optional) !Stream object or String: The text of the message.
Importance (optional) Long: The importance associated with the message.
SetLocaleiDs
The SetlocaleiDs method sets identifiers that define a messaging user's locale.
objNewMail.SetLocaleiDs(CodePageiD)
Parameter
CodePageiD (required) Long: The code page identifier to be used for this messaginguser.
Recipient Object
The Recipient object represents a recipient of a message.
484
CD0 for NTS Objects
Properties
Address
The Address property specifies the full messaging address for the recipient.
Read/write (read-only for a recipient on a message in the Inbox).
Syntax
objRecip.Address
DataJYpe
String
Name
The Name property returns or sets the name of the Recipient object as a string.
Read/write (read-only for a recipient on a message in the Inbox).
Syntax
objRecip.Name
DataJYpe
String
Type
The Type property specifies the recipient type of the Recipient object, that is,
whether it is a To, Cc, or Bee recipient. Read/write (read-only for a recipient on a
message in the lnbox).
Syntax
objRecip. Type
DataJYpe
Long
485
AppendixE
Remarks
The Type property has the defined values shown in Table E-13.
Table E-13. Type Property Values for Recipient Object
RECIPIENT TYPE
CdoTo
CdoCe
CdoBee
VALUE
1
2
3
DESCRIPTION
The recipient is on the To line (default).
The recipient is on the Ce line.
The recipient is on the Bee line.
Method
Delete
The Delete method removes the Recipient object from the Recipients collection.
Syntax
objRecip. Delete
Recipients Collection
The Recipients collection object contains zero or more Recipient objects and
specifies the recipients of a message.
Properties
Count
The Count property returns the number of Recipient objects in the collection.
Read-only.
Syntax
collRecips.Count
Data Type
Long
486
CDO for NTS Objects
Item
The Item property returns a single Recipient object from the Recipients
collection. Read-only.
Syntax
collRecips.Item(index)
Parameter
Index: A long integer ranging from 1 to collRecips. Count, or a string that specifies
the name of the object.
Data Type
Object (Recipient)
Methods
Add
The Add method creates and returns a new Recipient object in the Recipients
collection.
Syntax
Set objRecip = collRecips.Add( [name] [, address] [, type])
Parameters
name (optional) String: The display name of the recipient. When this parameter is
not present, the new Recipient object's Name property is set to an empty string.
address (optional). String: The full messaging address of the recipient. When this
parameter is not present, the new Recipient object's Address property is set to an
empty string.
type (optional) Long: The recipient type; the initial value for the new recipient's
Type property. The values shown in Table E-14 are valid.
487
AppendixE
Table E-14. Recipient Type Values
RECIPIENT TYPE
VALUE
DESCRIPTION
CdoTo
CdoCe
CdoBee
1
2
3
The recipient is on the To line (default).
The recipient is on the Ce line.
The recipient is on the Bee line.
RetumValue
objRecip: On successful return, represents the new Recipient object added to the
collection.
Delete
The Delete method removes all the Recipient objects from the Recipients
collection.
Syntax
collRecips.Delete
Session Object
The Session object contains session-wide settings and options.
Properties
In box
The Inbox property returns a Folder object representing the current messaging
user's Inbox folder. Read-only.
Syntax
objSession.Inbox
Data Type
Object (Folder)
488
COO for NTS Objects
MessageFormat
The MessageFormat property returns or sets the default message encoding.
Read/write.
Syntax
objSession.MessageFormat
Data Type
Long
Remarks
The MessageFormat property has the defined values shown in Table E-15.
Table E-15. MessageFormat Values for Session Object
MESSAGEFORMAT SEniNG
CdoMime
CdoText
VALUE
0
1
DESCRIPTION
The message is in MIME format.
The message is in uninterrupted plain text
(default value).
The MessageFormat property defaults to CdoMime. It serves as the default value for
the MessageFormat property of the Message object.
Name
The Name property returns the display name used to log on to this session.
Read-only.
Syntax
objSession.Nallf!
Data Type
String
489
Appendix£
Out box
The Outbox property returns a Folder object representing the current messaging
user's Outbox folder. Read-only.
Syntax
objSession.OUtbox
Data Type
Object (Folder)
Version
The Version property returns the version of the CDO for NTS Library. Read-only.
Syntax
objSession.Version
Data Type
String
Methods
GetDefaultFolder
The GetDefaul tFolder method returns a Folder object from a message store.
Syntax
Set objFolder = objSession.GetDefaultFolder(folderType)
Parameter
FolderType (required) Long: The folder type. This parameter can have exactly one
of the values shown in Table E-16.
490
CDO for NTS Objects
Table E-16. FolderType Values for Session object
FOLDERTYPE STTING
CdoOefaultFolderlnbox
CdoOefaultFolderOutbox
DECIMAL VALUE
1
2
MEANING
The COO for NTS library's lnbox.
The COO for NTS library's Outbox.
Return Value
objFolder: On successful return, contains the store's default Folder object of the
specified type. When the folder does not exist, GetDefaultFolder returns Nothing.
Logoff
The logoff method uninitializes the Session object.
Syntax
objSession.Logoff( )
LogonSMTP
The logonSMTP method initializes the Session object.
Syntax
objSession.LogonSMTP(DisplayName, Address)
Parameters
DisplayName (required) String: The display name to use for the messaging user
logging on, such as John Q. Doe.
Address (required) String: The full e-mail address to use for the messaging user
logging on, such as \jdoe@company. com.
SetLocaleiD
The SetlocaleiDs method sets identifiers that define a messaging user's locale.
491
AppendixE
objSession.SetlocaleiDs(CodePageiD)
Parameter
CodePageiD (required) Long: The code page identifier to be used for this
messaging user.
492
APPENDIX F
liS Applications
Performance
Benchmarking
liS APPLICATIONS CONSTITUTE A RELATIVELY NEW technology and can be considered an enhancement to the ever popular Active Server Pages (ASP). But, what
performance advantages do you get with an liS application as compared with an
ASP application?
To answer that question, three benchmark test results are presented in this
appendix. All tests were done on an AMD 350Mhz machine with 64MB RAM running Personal Web Server on a Wmdows 98 operating system. These tests included
Server Variables 1, Server Variables 2, and Database Access.
For each type of test, an ASP application and an liS application were written,
and the code for both the ASP application and the WebClass was basically the
same. In all of the ASP applications, no COM component was used.
Each operation category was performed five times for each application, and
the results were averaged. The Visual Basic Timer function was used to measure
performance in both types of applications. The Timer function returns a number
representing the number of seconds elapsed since midnight, precise to hundredths of a second.
The function was invoked twice, once at the beginning of the process and
once at the end. By subtracting the first number from the second, the result indicates how long (in hundredths of a second) it takes the Web server to complete
the process. The results of the three tests are provided at the end of this appendix.
Server Variables 1
In this test, both the liS application and ASP application read 16 server variables
and sent them to the browser. The code of the ASP application is given in listing
F-1 and the code for the liS application is given in listings F-2 and F-3.
listing F-2 is the ASP file of the liS application and listing F-3 is the code in
the WebClass. Note that in Listing F-2 the code generated by Visual Basic has been
493
AppendixF
modified to include the Timer function at the beginning and end of the code to
measure the elapsed time for the operation.
Listing F-1
<%
Application("t1") = timer
Response.Write "ALL_HTTP:" &_
Request.ServerVariables("ALL_HTTP") &"<br>"
Response.Write "ALL_RAW:" & _
Request.ServerVariables("ALL_RAW") &"<br>"
Response.Write "APPL_MD_PATH:" &_
Request.ServerVariables("APPL_MD_PATH") &"<br>"
Response.Write "APPL_PHYSICAL_PATH:" &_
Request.ServerVariables("APPL_PHYSICAL_PATH") &"<br>"
Response.Write "LOCAL_ADDR:" &_
Request.ServerVariables("LOCAL_ADDR") &"<br>"
Response.Write "PATH_INFO:" &_
Request.ServerVariables("PATH_INFO") &"<br>"
Response.Write "PATH_TRANSLATED" &_
Request.ServerVariables("PATH_TRANSLATED") &"<br>"
Response.Write "REMOTE_ADDR" &_
Request.ServerVariables("REMOTE_ADDR") &"<br>"
Response.Write "REMOTE_HOST" &_
Request.ServerVariables("REMOTE_HOST") &"<br>"
Response.Write "REQUEST_METHOD:" &_
Request.ServerVariables("REQUEST_METHOD") &"<br>"
Response.Write "SCRIPT_NAME" &_
Request.ServerVariables("SCRIPT_NAME") &"<br>"
Response.Write "SERVER_NAME:" &_
Request.ServerVariables("SERVER_NAME") &"<br>"
Response.Write "SERVER_PORT:" &_
Request.ServerVariables("SERVER_PORT") &"<br>"
Response.Write "SERVER_PROTOCOL:" &_
Request.ServerVariables("SERVER_PROTOCOL") &"<br>"
Response.Write "SERVER_SOFTWARE:" &_
Request.ServerVariables("SERVER_SOFTWARE") &"<br>"
Response.Write "URL:" &Request.ServerVariables("URL") &"<br>"
Application("t2") = timer
%>
494
liS Applications Performance Benchmarking
Listing F-2
<%
Application("t1") = timer
Server.ScriptTimeout=600
Response.Buffer=True
Response.Expires=O
If (VarType(Application("-wc-webClassManager")) = o) Then
Application.Lock
If (VarType(Application("-wc-webClassManager")) = o) Then
Set Application("-wc-webClassManager") = _
Server.CreateObject("WebClassRuntime.WebClassManager")
End If
Application.Unlock
End If
Application("-wc-webClassManager").ProcessNoStateWebClass _
"Test1.WebClass1", _
Server, _
Application, _
Session, _
Request, _
Response
Application("t2") = timer
%>
Listing F-3
Private Sub WebClass_Start()
Response.Write "ALL_HTTP:" &Request.ServerVariables("ALL_HTTP") &"<br>"
Response.Write "ALL_RAW:" &Request.ServerVariables("ALL_RAW") &"<br>"
Response.Write "APPL_MD_PATH:" &_
Request.ServerVariables("APPL_MD_PATH") &"<br>"
Response.Write "APPL_PHYSICAL_PATH:" &_
Request.ServerVariables("APPL_PHYSICAL_PATH") &"<br>"
Response.Write "LOCAL_ADDR:" &_
Request.ServerVariables("LOCAL_ADDR") &"<br>"
Response.Write "PATH_INFO:" &_
Request.ServerVariables("PATH_INFO") &"<br>"
Response.Write "PATH_TRANSLATED" &_
Request.ServerVariables("PATH_TRANSLATED") &"<br>"
Response.Write "REMOTE_ADDR" &_
Request.ServerVariables("REMOTE_ADDR") &"<br>"
495
AppendixF
Response.Write "REMOTE_HOST" &_
Request.ServerVariables("REMOTE_HOST") &"<br>"
Response.Write "REQUEST_METHOD:" &_
Request.ServerVariables("REQUEST_METHOD") &"<br>"
Response.Write "SCRIPT_NAME" &_
Request.ServerVariables("SCRIPT_NAME") &"<br>"
Response.Write "SERVER_NAME:" &_
Request.ServerVariables("SERVER_NAME") &"<br>"
Response.Write "SERVER_PORT:" &_
Request.ServerVariables("SERVER_PORT") &"<br>"
Response.Write "SERVER_PROTOCOL:" &_
Request.ServerVariables("SERVER_PROTOCOL") &"<br>"
Response.Write "SERVER_SOFTWARE:" &_
Request.ServerVariables("SERVER_SOFTWARE") &"<br>"
Response.Write "URL:" &Request.ServerVariables("URL") &"<br>"
End Sub
The code that is used to read the starting and end times of each test is given
in Listing F-4. The same code is also used for the second and third tests.
Listing F-4
<%
Response.Write "End:" & Application("t2") & "<br>"
Response.Write "Start:" &Application("t1")
%>
Server Variables 2
The Server Variables 2 test was that same as Server Variables l, except that the
process was repeated 100 times with a loop such as
For I = 1 to 100
<the code from previous test>
Next
Server Variables 2 was conducted because the Server Variables 1 proved too
easy for the liS ,application.
In Server Variables 1, the two Timer function invocations resulted in the same
number, which provides no useful information other than the assurance that the
process took less than 10 milliseconds.
496
liS Applications Performance Benchmarking
Database Access
The third test, Database Access, performed three database operations: Insert,
Select, and Delete. It first inserted three hundred records into an empty Access
database table, and then selected all the records and displayed them in an HTML
page before deleting all the records.
The code for the ASP application in this test is given in Listing F-5. Listings
F-6 and F-7 provide the code for the liS application. Listing F-6 provides the code
for the ASP file and Listing F-7 provides the code in the liS application's WebClass.
Listing F-5
<% @Language="VBScript"%>
<%
Application("tl") = timer
strConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" &_
"DBQ=" & Server.MapPath("dbs\dbOl.mdb")
strSQL = "INSERT INTO Products" &_
" (Category, Manufacturer, ProductName)" &_
" VALUES (4, 'Universal Teeth', 'Kidz.Toothbrush')"
Set en = Server.CreateObject("ADODB.Connection")
cn.Open strConnectionString
'Insert records
For i = 1 to 300
cn.Execute strSQL
Next
strSQL = "SELECT * FROM Products"
Set rs = Server. CreateObj ect ( "ADODB. Record set")
rs.Open strSQL, en
Do Until rs. EOF
Response.Write "ProductiD:" &rs("ProductiD") &"<br>" &_
"Manufacturer:" &rs("Manufacturer") &"<br>" &_
"ProductName:" &rs("ProductName")
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
strSQL = "DELETE FROM Products"
cn.Execute strSQL
cn.Close
497
AppendixF
Set en = Nothing
Application("t2") = timer
%>
Listing F-6
<%
Application("t1") = timer
Server.ScriptTimeout=600
Response.Buffer=True
Response.Expires=O
If (VarType(Application(""'Wc-webClassManager")) = o) Then
Application.Lock
If (VarType(Application(""'WC"'WebClassManager")) = o) Then
Set Application(""'WC"'WebClassManager") =
Server.CreateObject("WebClassRuntime.WebClassManager")
End If
Application.Unlock
End If
Application("-wc-webClassManager").ProcessNoStateWebClass _
"Project1.WebClass1", _
Server, _
Application, _
Session, _
Request, _
Response
Application("t2") = timer
%>
Listing F-7
Private Sub WebClass_Start()
Dim strConnectionString As String
Dim strSQL As String
Dim i As Integer
Dim en As ADODB.Connection
Dim rs As ADODB.Recordset
498
liS Applications Performance Benchmarking
strConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; " &
"DBQ=" & Server.MapPath("dbs\dbOl.mdb")
strSQL = "INSERT INTO Products" &
" (Category, Manufacturer, ProductName)" &_
"VALUES (4, 'Universal Teeth', 'Kidz.Toothbrush')"
Set en = New ADODB.Connection
cn.Open strConnectionString
'Insert records
For i = 1 To 300
cn.Execute strSQL
Next i
strSQL = "SELECT * FROM Products"
Set rs = New ADODB.Recordset
rs.Open strSQL, en
Do Until rs.EOF
Response.Write "ProductiD:" & rs("ProductiD") & "<br>" & _
"Manufacturer:" & rs ("Manufacturer") & "<br>" & _
"ProductName:" &rs("ProductName")
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
strSQL = "DELETE FROM Products"
cn.Execute strSQL
cn.Close
Set en = Nothing
End Sub
Test Results
The results of the ASP applications are given in Table F-1 and those of the liS
applications are in Table F-2.
499
AppendixF
Table F-1. Test Results for ASP Applications
Server Variables 1
Server Variables 2
Database Access
TEST 1
0.06s
5.05s
4.33s
TEST Z
0.06s
4.28s
4.45s
TEST 3
0.06s
3.85s
4.77s
TEST 4
O.OOs
4.01s
4.72s
TEST 5
O.OSs
4.07s
4.78s
AVERAGE
0.046s
4.252s
4.61s
............................................... ...............................................
Table F-2. Test Results for liS Applications
ServerVariables 1
Server Variables 2
Database Access
500
TEST 1
O.OOs
0.16s
4.01s
TEST Z
O.OOs
0.16s
3.57s
TEST 3
O.OOs
0.16s
3.35s
TEST 4
O.OOs
0.16s
3.39s
TEST S
O.OOs
0.16s
3.68s
AVERAGE
o.oos
0.16s
3.60s
Index
!, 189
!=, 189
#(number sign), 90, 91
$(AppPath), 397
%(percentage symbol), 73,442
& (ampersand), 49, 66, 71, 73, 144, 148, 190,
414
&#192,414
&& (double ampersand), 190
&amp;, 49, 66, 414
&gt;, 81, 414
&It;, 81, 414
&nbsp;, 142, 414
&quot;,414
&WCU,225
&XCUXCU, 226
*(asterisk), 89,387,442
I (forward slash), 260
</script> tags, 190--193,236--237
; (semicolon), 89, 139, 183-184, 187
'?(question mark), 73, 74
-'?, 178
'?WCU,225
'?WCUWCU, 225-226
_(underscore), 442
{}(curly brackets), 186, 187
I (single pipe character), 190
access,347,352,353-354
access control, 433
Access Control lists (ACLs), 345, 347
<ACRONYM>, 418
ACTION, 47, 53, 221, 223, 365, 416
Active Messaging 1.1, 299
Active Server Pages (ASP), 4, 5, 27-30
Database Access, 497
file uploading, 283
andiiS,6, 7-9,20--21,408
installable components, 367
andJavaScript, 181
objects, 57-58
Application, 82-85
BrowserType, 87-92
built-in, 421-430
Request, 58-68
Server, 80-82
ServerVariables, 74-79
Session, 85-87
values retrieved from, 69-74
programmers, file uploading for, 284-286
security, 365
ServerVariables 1, 493
Standard Setup Package, 393, 395, 397
version 2.0, 57, 77,235,421-422,423-430
version 3.0, 57, 77,235,421-430
+(plus sign), 73, 148, 184
<(less than character), 81, 178
<!-->, 417
<>, 189
==, 189
=,189
> (greater than character/prompt symbol), 81,
177
"9006: Invalid path to HTML template" error,
51
ActiveX Data Objects (ADO), 5, 274, 277, 367
and Command object, 159, 162
and Connection object, 97, 103
and connection string, 138-139
data access, 94
data shaping, 169, 170
object model, 95-96
and Recordset object, 105, 113, 114
version 2.5 objects, 431-432
ActualSize, 283
Ad Rotator, 368, 369-373
adAsyncConnect, 166
adAsyncExecute,166
adAsyncFetch,l66
adChapter, 171
adClipString, 142
adCmdStoredProc, 165
adCmdTable, 165
adCMDTableDirect, 165
adCmdText, 165
adCmdUnknown, 165
adCommandFile, 165, 166
II (double pipe characters), 190
A
<A>,419
-a, 179
Abandon,87,237,430
<ABBR>,418
Accept, 262
Accept-Encoding, 262,263
Accept -Language, 262
Access. See Microsoft Access
ActiveConnection,97,160
501
Index
Add
Attachments collection, 466
Connection object, 99, 101
e-mail,344
hidden fields, 252
Messages collection, 475
Recipients collection, 487-488
security, 347,353,354,354
Standard Setup Package, 395
Add & Read, 347
Add Custom Event, 64
Add Custom Webltem, 51, 63
Add HTML Template Webltem, 35
Add/Remove Programs, 290
AddHeader, 428
Add-In Manager, 390
AddNew, 130, 131, 132
AddProduct, 251, 252, 254, 255
<ADDRESS>, 418
Address,459,485,491
address, 487
AddressEntry object, 455, 457, 458, 459-460
adExecuteAsync,l65
adFetchAsync, 165
adHomePagetniL,370
adLockBatchOptimistic, 107, 108
adLockOptimistic, 107, 108
adLockPessimistic,l07,108
adLockReadOnly, 106, 107, 108
Admin Webltems, 233-234
Administration Web Site, 11, 13
Administrative Tools, 98
Administrator, 379
ADO. See ActiveX Data Objects
adOpenDynamic, 107
adOpenForwardOnly, 106, 107
adOpenKeyset, 107
adOpenStatic, 107
adReadOnly, 131
adStateExecuting, 168
adStateOpen, 168
adURL,370
adUseClient, 106
adUseServer, 106
Advanced, 37
Mghanistan, 362
Agent, 293, 294
alert, 201
alert(), 196, 216
algorithm, 350
ALL_HTTP, 260, 263, 424
ALL_RAW, 260, 263, 424
Allow, 261
Allow Anonymous Access, 348, 351
American National Standards Institute
(ANS0,433
ampersand(&), 49, 66, 71, 73, 144, 148, 190,
414
anchor(),217
AND, 190
animation,l82,198,213-215
Anonymous,346,351,379
502
Anonymous Access, 346, 347-349
Anonymous User Account, 349
Apache Web server, 3
App.Path, 82
APPEND, 170
AppendChunk, 281
AppendToLog, 428
APPL_MD_PATH, 424
<APPLET>, 420
Application,456-457
Application object, 29, 57, 82-85, 86, 234-235,
421-422
application path, 273
Application_OnEnd, 237,238
Application_OnStart, 237,238
ApplicationiD, 71
-<AREA>, 419
area, 197
ar,gun1ent=valueformat,l39, 140
arguments,l94,245-246,343-344
Arpanet, 293
array elements, 273
As Object, 367
ASC,436
ASCII, 263, 266, 271, 277, 292, 297, 413
ASP. See Active Server Pages
ASPCode, 422
ASPDescription, 423
ASPError object, 57, 422-423
ASPUpload, 284
asterisk(*), 89,387,442
asymmetric technology, 356
asynchronous operations, 166-168
AtEndOfi..og, 379
Atom, 103-104
AttachFile, 482-483
Attachment object, 455, 457, 458, 460-465
AttachmentForm, 334
Attachments, 344, 468
attachments
and Count property, 324
do~oading,329-330
forwarding, 340
message ID and index, 328-329
receiving, 301
sending, 300
uploading,332,334-337
Attachments collection, 457, 455, 458,
465-467
AttachtniL,483-484
aujd, 180
au_Iname,l80
AUTH_FASSWORD, 424
AUTH_PHYSICAL_PATH, 424
AUTH_TYPE, 424
AUTH_USER, 424
authentication
digital certificates for, 357
in liS 4.0 in Wmdows NT Server, 346-351
in liS 5.0 on Wmdows 2000 Server, 351-353
SSL for, 354-355
Authentication Control, 346
Index
Authentication Method, 347, 349
Author,274
Authorization, 262
authorizationLevel, 246
Authorize, 52, 53,54
autonumber, 131, 132
AVGQ,445
B
<B>, 418
-b,179
Badmail,291
bandwidth, 25
<BASE>,419
Base64,350
Basic Authentication, 346,349-350,351
batch files, 179
batch processing, 179
Bcc,292,295,477
<BD0>,417
BeginRequest, 31,79
BeginTrans, 98
benchmarking, 493-500
<BIG>,418
bigQ,217
Binary Large Object (BWB), 277, 280, 282,
283
BinaryRead,264-265,270,270,274,427
BinaryWrite, 265, 428
BinHex, 297, 298
BirthDate, 439-442
BIT,434
BIT VARYING, 434
blank values, 151, 198
blind carbon copy. See Bee
blinkQ, 217
BWB, 277, 280, 282, 283
<BLOCKQUOTE>, 418
Blur, 197
blurQ, 217
<BODY>,417
Body, 192, 193, 204, 478, 484
Body1,47
BodyFormat, 478
BOF, 109, 113
boldQ, 217
BootStrap, 403
BootStrap Files, 403
Border,371
<BR>,418
broken key, 361, 362
browscap.ini, 88, 89, 92
Browse,268
Browser Capabilities, 367, 368
BrowserWebltems, 230
browserDefinition, 89-90
browsers. SeeWeb browsers
BrowserType,367
BrowserType object, 57, 87-92
Buffe~28-29, 76-77,427
<BUTTON>, 419
BUTTON,416
button, 197
bytArray, 270
BytesReceived, 381
BytesSent, 381
c
-c, 177
-c;, 180
C/C++,4
C++/MFC,4
Cab Information Screen, 404
cabinetfiles,393,397,399,400
CacheControl, 77, 78,427
calling functions, 193-194, 203-204
Cancel, 160
<CAPTION>, 420
carbon copy. See Cc
carriage-return line-feed characters, 266, 292
carriage-return line-feed sequence, 259
Category, 423
Cc,295,478-479
CDO. See Collaboration Data Objects
CdoBcc,488
CdoBodyFormatHTML, 478
CdoBodyFormatText, 478
CdoCc,488
CdoDefaultFolderlnbox, 491
CdoDefaultFolderOutbox, 491
CdoEmbeddedMessage, 463, 464, 466
CdoEncodingBase64,483,484
CdoEncodingUUencode, 483, 484
CdoFileData, 463, 464, 466
CdoHigh, 480
CdoLow,480
CdoMailFormatMime, 481
CdoMailFormatText, 481
CdoMime, 344, 471, 489
CdoNormal, 480
CDONTS. See Collaboration Data Objects for
Wmdows NT Server
CdoText, 471,489
CdoTo,488
<CENTER>, 418
Central Management object, 383
CERT_,363
CERT_COOKIE, 424
CERT_FLAGS, 424
CERT_ISSUER, 424
CERT_KEYSIZE, 424
CERT_SECRETKEYSIZE, 424
CERT_:SERIALNUMBER, 424
CERT_SERVER_ISSUER, 424
CERT_SERVER_SUBJECT, 424
CERT_SUBJECT, 424
certificate authority (CA), 357,358,361,362
Certificate Signing Request (CSR), 359-361,
362
Certificates, 365
503
Index
certificates. See digital certificates
CGI. See Common Gateway Interface
challenge/response protocol, 352
Change,347
channels, secure, 365-366
CHAR,434
CHAR VARYING, 434
CHARACTER, 434
CHARACTER VARYING, 434
charAt, 195
charAt(), 217
ChargeOnDelivery, 119
Charset, 427
CHECKBOX, 264, 416
Checkbox, 119
checkboxes, 71,122,146,197
child objects, 196
child recordset, 169, 171, 172
child-column, 171
child-command, 171
ChooseContent, 377
Chr$, 271
CHUNK_SIZE, 281
chunks, 281
<CITE>, 418
Class, 456,457
Clear, 77,428
clearTimeout(), 217
Click, 44, 197
Clickable, 371, 372
Client Cursor Engine, 170, 171
ClientCertificate, 67, 76,423
ClientiP, 381
client-side file uploading, 264
client-side processing. See JavaScript
CLng, 133
Close, 98
close(), 217
closed, 215
CloseLogFiles, 379
closing delimiters, 266, 272
cmd_end, 177
en, 114,128
Codd, Edgar E, 105
<CODE>,418
Code,30,48,66-67
code
asynchronous, 166-168
for event procedure, 46-49
stored procedures for, 141
Code Editor, 45, 51
CodePage, 430
CodePageiD, 484, 492
<COL>,420
col_separator, 178
<COLGROUP>, 420
Collaboration Data Objects (CDO), 299
Collaboration Data Objects for Windows 2000,
299,300
Collaboration Data Objects for Windows NT
Server (CDONTS), 299-300,323
AddressEntry object, 459-460
504
Attachment object, 460-465
Attachments collection, 465-467
Folder object, 467
Message object, 467-477
methods, 455-456
NewMail object, 477-484
properties,455-459
Recipient object, 484-486
Recipients collection, 486-488
Session object, 488-492
collAttachments, 466, 468
collections
Application object, 421
Request object, 423-426
Response object, 427
Session object, 429
collMessages,475
collRecips, 471
colMessages, 323
colMessages.Item(l), 302
colMessages.Item(2), 302
colors, 414
COLUMN,453
Column,423
column width, 177
ColumnDelimiter, 142
column -separator character, 178
COM, 3, 5, 7, 8
COM components, 367-369, 406
COM object, 369
Command, 431
Command object, 96, 159-164, 165, 166
command terminator, 177
CommandText, 160
<COMMENT>, 417
Comments, 296, 376
comments, 89
CommitTrans, 98
Common Gateway Interface (CGI), 1, 4, 5
Communications of the ACM, 105
Company, 169
CompanySecret HTML template, 219
compiling, 161
Component Object Model (COM), 3, 5, 7, 8
components, installable, 367-369
Ad Rotator, 369-373
Content Linking, 373-375
Content Rotator, 375-377
Counter, 377-379
File Access, 379
Log,379-382
Mylnfo, 382-383
Page Counter, 383-384
Permission Checker, 384-385
Tools, 385-387
Confirm, 119
confirm(),l96,217
Connect to Custom Event, 45, 46, 47, 50
Connect to Webltem, 50, 52, 65
Connection, 431
Connection object, 96-97
and asynchronous operations, 166, 167
Index
and Command object, 159-160, 161, 162,
163-164
and ConnectionString, 138-140
and data shaping, 169-170
Execute method, 125, 131
and Recordset object, 105, 112, 113, 114
setting up, 97-104
connection string, 138-140
ConnectionString, 97, 98, 138-140,234
content, dynamic, 33-34
Contentlinking,368,373-375
Content Rotator, 368, 375-377
CONTENT_LENGTII, 424
CONTENT_TYPE, 424
ContentBase,461,466,468,479,483
Content-Encoding, 261
ContentiD, 461, 469
Content-Length, 261,263
ContentLocation,462,466,469,479,483
Contents, 83, 84, 421, 429
Contents.Remove, 422, 430
Contents.RemoveAil, 422, 430
ContentSchedule, 376
content-schedule-path, 377
ContentString, 376
Content-Type, 261,263
ContentType, 427
Control Panel, 99
controls, 44
ContRot.dll, 376
CONVERT, 345
convertToOZDate, 207
Cookies,263,381,423
cookies
acceptance of, 229-232
and e-mail, 319
and JavaScript, 182
Request object, 67
Response object, 427
Server"ariables, 75
Session object, 85-86
state management, 220, 237, 239-250
copyright, 7
Count
Application object, 83
Attachments collection, 465
e-mail, 302, 323-324
Message object, 468
Messages collection, 474
QueryString, 71
Recipients collection, 486
Request object, 59, 60
state management, 241
COUNTQ,445
COUNT(*), 445
Counter, 234-235
Counters, 368, 377-379
covertToUSDate, 207
Create, 409
Create New Key, 359
CREATE TRIGGER, 176
Create "irtual Directory, 18
CreateObject, 29, 31, 82, 369,428
CreateParameter, 160
Cuba,362
curly brackets({}), 186,187
CursorLocation, 106
cursors, 106, 107
CursorType, 106
custom events
connecting HTML elements to, 52-54
connecting tag attributes to, 45, 46
and QueryString, 71-72
and Request object, 63-64, 66
custom tags, 40-44
Custom Webltems, 51, 252, 371
connecting HTML elements to, 52-54, 126
connecting tag attributes to, 46
Nextltem property, 54
and Request object, 63-64, 66
URLFor method, 52
Customer.cust, 172
CustomerlD, 132, 171
Customers,169,171, 172
CustomFields, 381
CyScape, lnc., 92
D
-d,177
DAO. See Data Access Objects
data,433,442-444,452-453
Data Access Objects (DAO), 95, 113
data integrity, SSL for, 354-355
data retrieval, 141-148
data shaping, 168-173
Data Source Administrator, 98, 102
Data Source Name (DSN), 98, 99-101, 103,
104,138,140
data type
Address, 459, 485
Application, 456
Attachments, 468
Bee, 477
Body,478
BodyFormat, 478
Cc,479
Class,457
ContentBase,461,468,479
ContentiD, 461, 469
ContentLocation,462,469,479
Count, 465,474,486
From,480
HTML Text, 469
Importance, 470,480
lnbox,488
Item, 466,475,487
MailFormat, 481
MessageFormat,470,489
Messages, 467
Name,460,467,485,489
Outbox,490
Parent,458
505
Index
Recipients, 471
Sender, 472
Session, 459
Size,472
Source,463
Subject, 472, 481
Text, 473
TimeReceived, 473
TimeSent, 473
To,481
JYpe,460,463,485
Value, 482
Version, 482, 490Database Access, 7, 9
Database Access, 493, 497-499, 367, 368
database servers, 3
databases,93, 141,220,259,266,345
ADO object model, 95-96
asynchronous operations, 166-168
basics, 93-94
Command object, 159-164
Connection object, 96-104
connection string, 138-140
data shaping, 168-173
form splitting, 151-157
GetString data retrieval, 141-148
pubs, 175,176,180,280
record additions, 130-133
record deletion, 136-138
record display, 119-124
record insertion, 125-128, 148-150
record updates, 134-136, 150-151
Recordset fields, 157-159
Recordset object, 105-116, 130-133,
165-166
Select elements, 116-119, 174-180
single quote factor, 128-129
stored procedures for speeding up code,
141
text files, 174-180
universal access, 94
uploaded files in, 277-284
DataGrab, 5, 6
DATE,434
Date, 260, 292, 297
date, 206
Date of Birth, 152
DateField, 149
DateTime, 381
db_name, 177
DB-Library, 175
<DD>,419
Debug.Print, 32, 127
DEC,434
DECIMAL, 434
decryption, asymmetric technology for, 356
Default SMTPVirtual Server, 290, 291
default values, 151
Default Web Site, 21,23
defaultPropertyN, 91
defaultStatus, 215
defaultValueN, 91-92
506
definitions, 419
<DEL>,417
delay, 214
DELETE, 175, 176
Delete, 9, 37,464,466-467,474,476,486,488,
497,500
deleteCookie, 245,247
delimiters, 266, 271, 272
Delivery, 119
Denied Access, 354
Deny Access On, 353
dependency file, 393, 396, 403-406
Deploy, 406
deployment,389,406-407
DES,356
DESC,436
Description, 423, 452
Designer. SeeWebClass Designer
Details, 365
development computer, 11
<DFN>,419
dialog box, 201
Digest Authentication, 351-352
digital certificates, 357, 360,361-362
Dir$, 323, 333, 334, 386
directories, virtual, 17-18, 19, 21, 22
Directory Permission, 347
Directory Security, 346, 349, 353, 354, 359,
363
Directory Services, 352
DisplayEmai!Details, 325-344
DisplayName, 491
DISTINCT, 435, 438
<DIV>, 417
<DL>,419
DLL. See dynamic link library
DNS Lookup, 353, 354
Do,204
<!DOCTYPE>, 412, 417
document, 200, 215
Document object, 195
document structure, 412-413, 417
DOMAIN, 240-241
Domain Name Restrictions, 353, 354
DOS ERRORLEVEL, 179
double ampersand(&&), 190
double pipe characters, 190
DOUBLE PRECISION, 434
double quotes, 184
double vbCrLf, 271, 272
DownloadAttachment, 329-330
downloading, attachments, 329-330
Driver, 99
drivers, 99
Drop,288,291,292,299,30l
DSN. See Data Source Name
<DT>,419
dynamic content, 33-34
dynamic cursors, 107
dynamic link library (DLL), 4, 5, 10, 30, 31, 79,
239,285,370,393
Index
E
-E,177
-e, 177
e-coDlDlerce,357,358
EClit,346,349,353,354,363
EClit Directory, 22
EClit HTML Template, 35, 38
EClitProperties,21
eCliting, HTML Template Webltems, 37--44
EClitOrder, 209
elements, 200
connecting to custom events, 52-54
connecting to events, 44--45
connecting to Webltems, 50
displaying records in, 119-124
docUEnentsDn1cture,412-413
and event handling, 197
file uploaCling, 273
form,48,182,207-213
and Request object, 59, 60, 66
retrieving values from, 69-74
Select, 116-119
state management, 241
and tag attributes, 46
See also specific elements
<EM>,418
e-Dlail,125,129,287
attachments
do~oaCling,329-330
uploaCling,334-337
details, 325-344
formatting,291-299
forwarCling,340-344
Microsoft SMTP server, 290-291
protocols, 287-288
received, 321-325
receiving, 301-319
replying to, 337-340
senCling,300-301,331-333
servers, 288-289
validating users, 319-321
.eml, 292, 301
EmployeeiD,440,441
Enable Automatic Password Synchronization,
349
encoCling,256-257,297-299
EncoClin~ethod,483
Encrypted, 296
encryption,256-257,296,350,354-355,356,
364
Encryption Settings, 364
Encryption Type, 365
End, 77,428
end tags, 412
EndRequest, 31
entity headers, 261
entity-body, 259, 266, 276
EOF, 109, 113, 179
equi-join, 447
Error,431
Error object, 57,96
error_level, 178
Errors,431
errors
"9006: Invalid path to HTML template,"
51
displaying, 178
file uploaCling, 270, 271, 273, 274
"index out ofrange, n 60
and Response object, 77
"Run-time error '3713': Invalid operation
on object while still connecting,"
167
single quote factor, 128-129
state management, 237,238
Event, 47, 48,52
eventhandling,197-198
events,63-64,66, 71-72,303
Application object, 422
connecting HTML elements to, 52-54
connecting template elements to,
44-45
connecting to Webltems, 50-51
Session object, 430
tag attributes connected to, 45-46
writing code for, 46-49
See also specific events
Exchange Server, 94
Execute,125,131,132,159,160,161,162,167,
428
EXPIRES, 240
Expires, 78, 261, 427
ExpiresAbsolute, 78, 427
<Extension-Field>, 296-297
Extension-Fields, 296,297
External HTML Editor, 37-38
F
factorial function, 194
FAT,345
FAT32,345
Field, 170, 431
Field Names, 303
field names, 292-297
Field object, 96
fieldn, 125
FieldName, 149
Fields, 130, 171, 365
<FIELDSET>, 419
FILE,264,275,416
File,283,423
File Access, 368, 379
FileiD,280
file name, 301-302
File Permissions, 347
File Security, 353, 354, 363
file uploaCling, 259
for ASP developers, 284-286
attachments, 334-337
507
Index
client-side, 264
database storage, 277-284
form elements, 274-275
HTIP request structure, 259-264
multiple, 275-276
server-side, 264-274
FileExists, 385-386
FileLen,281
FileName, 380, 483
filename,464,465
FilePath,385
filepath, 281
filesize, 281
FileSystemObject, 285, 379
Finish,100,102,399,405,407
First Name, 152
FirstName, 125, 134, 263, 436-442
fixDate, 246
fixedQ,217
FLOAT,434
Floppy Disks, 407
Flush, 77, 428
Focus, 197
focusO, 201,217
Folder,407
Folder object, 302, 455, 457, 458, 467
Folder'!YPe, 490
<FONT>,418
fontcolorQ, 217
fontsizeQ, 217
for, 293
for loop, 186--187
<FORM>,419
FORM,416
Form,59,60,67, 71,149,152,211,265,319,
320,423
form elements, 48, 182, 207-213, 274-275
form splitting, 151-157
form tags, 48
Form1,47-48,126
formatting
e-mails, 291-299
text, 413, 418
form-based VB applications, 9-10
forms,44,200,201,416,419
formValidate, 203
forward slash (!), 260
forwarding, e-mails, 340-344
<FRAME>,420
frames,420
frames[], 215
<FRAMESET>, 420
FROM, 435, 447, 448, 450
From,262,292,293,294,479-480,484
from, 195
Full Control, 347
Full time, 70
Fully Qualified Domain Name, 291
functions, calling, 193-194, 203-204. See also
specific functions
508
G
GATEWAY_INTERFACE, 425
GET, 67, 71, 416
Get, 259, 281, 378
GetAdvertisment, 371, 372
GetAllContent, 377
GetChunk, 283
getCookie, 245
GetDefaultFolder, 490-491
GetDetails, 125, 127
GetFileFromDatabase, 278, 282
GetFirst, 476
Getlndex, 209
GetLast, 476
GetLastErro~428
GetListCount, 374
GetListlndex, 374
GetNext, 476-477
GetNextDescription, 374
GetNextURL, 374
GetNthDescription, 374
GetNthURL, 374
GetObject, 5, 6
GetPrevious, 477
GetPreviousDescription, 374
GetPreviousURL, 374
GetString, 141-148, 174
.giffiles, 213, 414
global variables, 83
global.asa, 20-21,84-85,87,235-238,395,
397,430
GMT. See Greenwich Mean Time
GO, 177,179
GotFocus, 197
Granted Access On, 353, 354
graphics, 420
greater than character(>), 81
Greenwich Mean Time (GMT), 297
Greeting_ProcessTag, 41
GROUP BY, 435, 446
Group of Computers, 353, 354
GTE CyberTrust Solutions, 357
H
-H, 178
-h, 177
HasAccess, 384, 385
hash,350,351,352
HAVING, 435, 450
<HEAD>,417
HEAD,412
Head, 192,199,259
</head>tags,190-193
<head> tags, 190-193
headers,177,259,260-262,263,265,266,292
HIDDEN, 264, 416
Hidden,69, 119,152
Index
hidden fields, 220, 250--257, 332
History object, 195
history, 215
connectingto,50-- 51
editing, 37-44
EditOrder, 209
and events, 44-50
Register, 125-126, 127
and Select element, 117-118
Hits, 384
<Hn>,418
<HR>,418
HREF, 415
.htm files, 393, 395, 397, 408
<HTML>,417
HTML (hypertext markup language), 1
Ad Rotator component, 371
and BrowserType object, 87
code,24-26
Content Rotator component, 375, 376, 377
e-mail, 320,331
file uploading, 264,274,275
form splitting, 152-157
GET method, 67
GetString method, 142-143, 144, 146
and liS, 9-10
and Internet Service Manager, 11, 13
andJavaScript, 181, 182, 183, 190--195, 196,
197,198,199,200, 202
record insertion, 148,149
security, 365
and Select elements, 174
state management, 256
tables,45,87, 142-143,144,146, 172,175
Tools component, 385, 387
and WebClasses, 27
HTML 4.01, 411
crash course on, 411-416
tags, 417-420
HTML comments, 193
HTML elements. See elements
HTMLform, 134-136,182
HTML Recommendation s, 413
HTML TemplateWebitem s, 34-37,220
connecting to, 50--51
editing, 37-44
and events, 44-45, 46-49
and tag attributes, 45-46
HTML Text, 469
HTML tags. See tags
HTMLEncode,73 ,81,82,428
HTTP (hypertext transfer protocol), 1
and ASP files, 17,20
BeginRequest event, 31
GET, 67,71
and ISAPI filters, 4
Log component, 381, 382
POST,67
Request object, 423
security, 363
ServerVariables, 74
and Session object, 85, 88
state management, 219,240
HTTP 1.1, 352
HTTP request, 259-264, 266, 284-285, 371
HTTP_, 75
HTTP_ACCEPT, 425
HTTP_ACCEPT_LANGUAGE, 425
HTTP_COOKIE, 425
HTTP_<HeaderName>, 425
HTTP_REFERER, 425
HTTP_USER_AGENT, 88, 425
HTTPS, 362, 363, 365, 425
HTTPS_KEYSIZE, 425
HTTPS_SECRETKEYSIZE, 425
HTTPS_SERVER_ISSUER, 425
HTTPS_SERVER_SUBJECT, 425
HTTPUserAgentHeader, 89,91
hyperlinks, 45, 72, 414, 419
hypertext markup language. See HTML
hypertext transfer protocol. See HTTP
I
<1>, 418
-i, 178
i++, 187
Icon Groups, 403
ID, 134,136,162,280, 283
IDE. See Integrated Development
Environment
identifiers, 189, 190
if statements, 185-186, 199
If-Modified-Since, 262
<!FRAME>, 420
liS. See Internet Information Server
IMAGE, 264, 416
Image,277
Images, 324, 397
images, 45, 414
IMAP, 289
<IMG>,420
Immediate, 127
immediate parent, 458
Importance, 470,475,480,484
impressions, 370
Inbox,302,323,32 7,488
Increment, 378
"index out of range" error, 60
Indexed Sequential Access Method (ISAM), 94
indexes, 157-159,208-209 ,468,471,475,487
indexOf(), 217
InetPub,290
Informix, 3, 93
Initialize, 31
inner join, 447-449
<INPUT>, 419
INPUT, 264, 416
Input, 129
509
Index
inputvalidation,198-207
input_file, 178
In-Reply-To, 295
<INS>, 417
INSERT, 175, 176, 443
Insert, 9, 497, 500
lnsertFileToDatabase, 278, 280, 281, 282
insertion_point, 386
Install Key Certificate, 362
Install Location, 397-398, 404
installation, ofiiS applications, 407-409
Installation Title, 397
INSTANCE_ID, 425
INSTANCE_META_PATH, 425
nStrRev, 272, 365
INT,434
intApplicationiD, 71
INTEGER, 434
Integrated Development Environment (IDE),
20,23,35
Integrated Wmdows Authentication, 351,
352-353
International Standards Organization (ISO),
287,433
International Telecommunications UnionTelecommunications Standards
Sector (ITU-TSS), 287
Internet, overview of, 1-2
Internet Engineering Task Force (IETF), 287
Internet Explorer, 54-55
BrowserType object, 91
code, 24
file uploading, 263,274
HTML Template Webltems, 42
JavaScript,181,183
security, 350,351,352-353,364
state management, 240, 245
Internet Information Server (liS), 3, 5
applications, 389
and ASP, 7-9,27-30
dependencyfile,403-406
deploying,406-407
dynamic content, 33-34
and form-basedVB applications, 9-10
installing,407-409
Package and Deployment Wizard,
390-392
packaging,392-393
performance benchmarking, 493-500
structure of, 10
WebClasses, 6-7
e-mail,290
installable components, 367, 378, 385
security on Wmdows NT and Windows
2000 servers, 345-353
Standard Setup Package, 393-403
version 3.0, 95
version 4.0, 4, 57
version 5.0, 57, 79, 80
See also Active Server Pages; Custom
Webltems; HTML Template
Web Items; WebClasses
510
Internet Information Service, 290
Internet Message Access Protocol. See IMAP
Internet Package, 392
Internet Server Application Programming
Interface (ISAPn, 4, 5, 29
Internet Service Manager, 21, 22
e-mail, 291
and liS applications, 409
security, 346,348,351,353,354,359,
363
Web server administration, 11, 13
Internet Service Provider (ISP), 2, 288
INTERVAL, 434
intFileNameEnd, 272
intPathNameStart, 272
"Invalid operation on object while still
connecting" error, 167
10Mode,379,380
IP addresses, 353-354
Iran,362
Iraq, 362
IS NOT NULL, 439
ISNUll,439
ISAM. See Indexed Sequential Access
Method
ISAPI. See Internet Server Application
Programming Interface
lsClientConnected, 427
<ISINDEX>, 417
isMoney, 204
isNumeric, 204
isOZDate, 206, 207
ISP. See Internet Service Provider
isql, 176, 177, 178, 179
isUSDate, 206
isValidPhoneNumber, 204
italicsQ, 218
Item, 52, 59, 71, 83, 84, 241, 465-466, 475,
487
itemname, 67
J
Java, 3
java,215
Java applets, 182
Java Web server, 3
JavaScript,87-88,181-183,245-250,274,
332
animation,213-215
eventhandling,197-198
HTML form elements, 207-213
in HTML pages, 190-195
input validation, 198-207
object model, 195-196
String object, 217-218
and Visual Basic, 183-190
Window object, 215-217
joins, 447-451
.jpeg, 414
JScript, 5, 6, 183
Index
K
<KBD>,418
keep-alive, 263
Kerberos v5, 352
Key, 59,71,83,241,359
Key Distribution Center (KDC), 352
Key Manager, 359, 361, 362
Key Name, 360
keyhole, 358
keys. See private keys; public keys
Keywords, 296
Kill,323
Kosovo,362
L
-L, 178
-1, 179
<lABEL>, 419
LAN. See local area network
Last Name, 152
lastlndexOf(), 218
Last-Modified, 261
LastName,59, 125,128,134,200,263,
436-442,443
layers, 420
LCID,430
Left$, 365
<LEGEND>, 419
length,195,216,217
less than character (<l, 81, 178
<U>,419
Libya, 362
Line,423
<UNK>,419
link(), 218
Linux,3
List, 347
ListEmails,320,321,327
lists, 419
LiveScript, 183
lngFileSize, 274
lngNextOrderlD, 133
lngProductiD, 123
lngTotalBytes, 270
Load, 31
local area network (LAN), ll, 139
Local Path, 23
LOCAL_.ADDR, 425
localhost, 263
locally configured servers, 178
Location, 195
location, 216
Lock,84,235,421,422
LockJYpe,106, 107-116,131
Log,368,379-382
Loggedln,232,234
logical parent, 458
Login,52,219,303,304,319,321
login name, 60, llO, ll3, 131, 252, 255, 256,
319,320,345
login_id, 177
Login_ProcessTag,53-54
LoginName, 131,228,319-320
LoginPage,62,63,65, 111,221,222,223,224,
225,229,242,244,251,254
Logoff,491
LOGON_USER, 425
LogonSMTP, 302, 491
lookup tables, 175
LostFocus,44, 197
M
-m, 178
Macintosh, 289, 297
Macintosh Personal Web Server, 385, 386
MAIL,289
Mail, 303
Mail Webltems, 321, 325
Mail_DisplayForwardForm, 340
Mail_DisplayUpload, 334
Mail_DisplayUploadAttachmentForm, 334,
335
Mail_Forward,340
Mail_Send, 332
Mail_UploadAttachment, 334,335
mailboxes, 294
MailFormat, 480-481
MailRoot, 290
MakeCab, 400
<MAP>,419
MapPath,81-82,429
Math,216
mathematical calculations, 182
MAX, 133
MAX(),445
max_text_size, 179
MD4,350
Member_Loggedln,219
MemberCount, 378
MemberlD, 146
Members, 304
Members Only, 60
Members Webltem, 52, 54, 243, 244
and LockJYpe options, 110, ll2
and QueryString, 71, 74
and record insertion, 125, 126
and record updating, 134
and Request object, 6~4. 65
Members_GetDetails, 130
Members_VerifyLogin, 232,247
message ID, 325,327,328
message identifiers, 295
Message object, 455,467-474
class property values, 457
Delete method, 476
e-mail,301,324,340,344
GetFirst method, 476
GetLastmethod,476
511
Index
GetPrevious method, 477
immediate parent, 458
Item property, 475
Source property, 463
~essageFormat344,470-471,489
~essage- ID, 295
~essages,302,323,324,327,467
~S-DOS, 82, 179
msg-id specification format, 295
~SWCRUN.DLL, 10
multiple file uploading, 275-276
multiple tables, retrieving data from, 446-451
~ultipurpose Internet ~ail Extensions. See
~essagescollection,455,457,458,474-477
<~ETA>,417
~ylnfo,368,382-383
~ETHOD, 47, 416
~ethod, 259, 381
methods
Ad Rotator, 371
Application object, 421-422
Attachment object, 464-465
Attachments collection, 466-467
CDONTS, 455-456
Content Linking, 373-375
Content Rotator, 377
Counters, 378-379
Log,379-380
~essage object, 474
~essages collection, 475-477
New~ail object, 482-484
Page Counter, 383-384
Permission Checker, 385
Recipient object, 486
Recipients collection, 487-488
Request object, 427
Response object, 428
Server object, 428-429
Session object, 430, 490-492
Tools, 385-387
~lfT~L,461,462
~crosoft, 2-5, 92, 238, 367, 369. See also
specific products
~crosoftAccess, 93, 97, 98, 99-101, 104, 140,
144,175,277
~crosoft Data Access Components (MDAC),
94
~crosoft Exchange Server 5.5, 299
~crosoft Jet, 94
~crosoft Key ~anager, 359, 361, 362
~crosoft~anagementConsole (M~C), 11,
12,13,21,23,290,291
~crosoft Scripting, 285
~crosoft Site Server Express 3.0, 284
~crosoft S~TP server, 290-291
~crosoftSQLServer, 93, 94, 98,101-103,139,
162,175,176,180,277,452,453
~icrosoftTransaction Server (~S), 57,95
~I~E,297,298,461,466,468,469
W~E H'Th1L, 461, 462
~IN0,445
~ss, 70
~issing Dependency Information, 395
~~C. See ~crosoft ~anagement Console
~oveFirst, 108, 109
~oveLast,108,109
~oveNext, 106, 108, 109, 141
~ovePrevious,108,109
512
~SDataShape, 170
~I~E
myServer, 180
~ySQL,3
N
-n,177
n_,149
n_FieldName, 149
Name, 59, 71,72, 73,460,467,485,489
name,216,466,487
N~E=VALUE, 240
NamelnURL, 27
NATIONAL CHAR, 434
NATIONAL CHAR VARYING, 434
NATIONAL CHARACTER, 434
NATIONAL CHARACTER VARYING, 434
Nationality, 436-442
navigator, 216
NCHAR,434
NCHAR VARYING, 434
Netscape,24,42,54-55,183,216,244,245,
255,355
Netscape Navigator, 181, 183, 197, 240, 263,
350,364
Network Information Center, 296, 297
New, 96-97, 369
New Technology File System (NTFS), 345, 384
NewEmployees, 443
New~ail,299,300,333,340
New~ail object, 455,456,457,458,477-484
Next, 102,396,397,404,406,407
Nextltem, 54, 230
NextLink, 373
NextRecordset, 98
No Access, 347
<NOF~ES>, 420
non-nullability, 439
North Korea, 362
<NOSCRIPT>, 417
Not, 189
Nothing, 458,476,477
NTFS4,345
NTFS5,345
NULL,128,131,133,142,169,178,443,445,
450
nullability, 434-435
NullExpr, 142
Number,422
number sign(#), 90, 19
numBorder, 370
NU~ERICAL, 434
Index
numHeight, 370
NumRows, 142
NumSeconds, 274
numWidth, 370
0
-0,179
-0, 179
objAddressEntry, 460
objAttach, 468
<OBJECT>, 420
Object library, 369
ObjectContext objects, 57
Objects, 30
objects. See under Active Server Pages;
specific objects
objMessage, 324, 471, 472, 475, 477
objRecip, 471, 488
ODBC. See Open Database Connectivity
Ok reply, 289
<01>,419
OLE DB, 94, 95, 97, 98, 138, 139, 140, 169, 277
OLE Messaging, 299
OnClick,44
onClick, 197
one.asp, 20
OnEnd, 84, 86, 87
OnStart, 84, 86, 87
onSubmit, 152, 198
Open,97,98, 105,108,112,114,133,138,
165-166,234
Open Database Connectivity (ODBC), 94, 97,
98,99-101,102,138,139,140,277
open(),217
opener, 216
OpenForwardOnly, 109
OpenLogFile, 380
openWindow, 332
Operator, 379
<OPTGROUP>, 419
<OPTION>, 419
Option Base 0, 280
Option Base 1, 280
Option Explicit, 185
Options, 37
Options parameter, 165-166
OR, 190
Oracle, 3, 93, 94, 139, 149, 277
ORDER BY, 436
order confirmation form, 120-122
OrderiD, 119, 132, 133
Orders, 132, 133, 171, 172
orders.cust_ID, 172
OrderValue, 445
Outbox, 344, 490
outerjoin,447,450
output_file, 179
output_uri, 386
Owner,386
p
<P>, 418
-P, 178
-p, 177
Package,404
Package and Deployment WIZard, 389,
390-392,394,395,399,403,404,
405,406
Package '!YPe, 393
packages, 216
packaging, liS applications, 392-393
packet_size, 179
padlock icon, 364
Page Counter, 368, 383-384
Page Source, 24
Pagel, 152
Page2, 152
Page3, 152
PageHit, 384
PageTitle, 42
<PARAM>, 420
PARAMETER, 172
Parameter, 431
Parameter object, 96
Parameters,l60,431
parameters, 164, 165-166,293
Ad Rotator, 370-371
Add, 466, 475, 487
AttachFile, 483
Attachments, 468
AttachURL, 483
GetDefaultFolder, 490,491
Item, 465, 475, 487
LogonSMTP, 491
ReadFromFile,464
Recipients, 471
Send,484
SetLocaleiD, 492, 484
Value,482
WriteToFile, 465
See also specific parameters
Parent,456,457-458
parent, 216
parent browser, 89-90
parentrecordset, 171, 172
parent-column, 171
parent-command, 171, 172
parsing, 161, 266
Part time, 70
PASSWORD,264,416
Password, 69, 97, 98, 166, 320, 360
passwords
connection string, 139
e-mail, 319, 320
file uploading, 281
Recordset object, 105, 110, 113
Request object, 60
security, 345, 348, 349, 350, 351, 352, 352, 362
Select elements, 178, 180
state management, 251, 252, 254
513
Index
PATH,241
path name, 272
PATH_INFO, 384, 426
PATH_~SLA11U),283,426
pathlnfo, 384
pattem,204
Peer Web Services, 17
percentage symbol(%), 73,442
performance benchmarking, 493-500
PERL,3,4,5
PerlScript, 5
Permission Checker, 368, 384-385
Permissions, 347
Persits Software, 284
Personal Web Manager, 11, 12, 21, 22
Personal Web Server, 11, 17, 21, 493
Personal Web Server for Macintosh, 385, 386
PHP,3
Pickup, 291, 299
Pies, 427
pipe character (1), 190
placeholders, 172
plugin_name, 386
PluginExists, 386
plus sign(+), 73, 148, 184
position variables, 214-215
POST, 68, 416, 427
Post, 259, 265
Post Office Protocol3 (POP3), 289
Posting Acceptor, 284
Pragrna,260
<PRE>,418
prefixes, tag, 40-44
Prepared, 162
prirnarykey,l31,134
primitive arguments, 194
privacy, 7, 296
Private, 77-78
private keys, 356, 357, 358
Procedure,45
Process_Tags,210
ProcessForm,386,387
ProcessNoStateWebClass, 29
ProcessTag, 387
and Custom Webltems, 51, 54
and HTML Template WebiTems, 36, 40-43,
45,118,124,152,175
security, 365
state management, 244, 255
Product Select, 209
roductiD, 117, 119, 123, 132,209,211,452
ProductName,452
Products,ll7,123,172,444,453
Products Webltem, 54, 80, 252
Project, 103
project DLL, 31
Project Explorer, 16, 23, 26, 27
promptsymbol(>),l77
promptQ,l96,217
Properties,96,431
Command object, 160
e-mail, 291
514
HTML Template WebItems, 43
security, 347,348,353,354,359,365
state management, 239
WebClasses,23,26,27
properties, 90-91
Ad Rotator, 371-373
AddressEntry object, 459-460
ASPError object, 422-423
Attachment object, 461-464
Attachments collection, 465-466
CDONTS, 455-459
Folder object, 467
Log,380-382
Message object, 467-473
Messages collection, 474-475
NewMail object, 477-482
Recipient object, 485-486
Recipients collection, 486-487
Request object, 426
Response object, 427
Server object, 428
Session object, 429-430, 488-490
See also specific properties
Property, 431
propertyN, 89,90
protocols
authentication,352
e-mail, 287-288
HTTPS,362,363,365
ProtocolStatus, 381
ProtocolVersion, 381
Provider, 169-170
Proxy server, 353
proxy servers, 77-78, 260
Public, 77-78
public keys, 356, 357, 358
pubs database, 175, 176, 180, 280
Python, 5
Q
<Q>,419
-Q,l77
-q,l77
Quantity, 119, 132
query,l77
QUERY_STRING, 426
QueryString,59,67, 71-74,423
question mark(?), 73, 74
Queue,291
QUR370,256
R
-r {011}, 178
RADIO, 264, 416
Radio,119
radio, 70,122,197
Random,386
RC2,356
Index
RC5,356
RCPT,289
RDBMS,433
Read,347,348,349,409
ReadFilter, 380
ReadFroniFile,464
ReadLogRecord,380
REAL,434
Received, 293
received e-mails, 321-325
receiving e-mails, 301-319
Recipient object, 455, 457, 458, 484-486
Recipients, 471
Recipients collection, 455,457,458,486-488
Record,432
Record object, 95
RecordCount, 113
records
adding, 130--133
deleting, 136-138
displaying, 119-124
inserting, 125-128,148-150
updating,134-136,150--151
recordset, 105,281,282
Recordset field, 157-159
Recordset object, 96, 105, 234, 432
adding records with, 130--133
and asynchronous operations, 166
child, 169, 171, 172
and Command object, 159-160
and Connection object, 97, 98, 166
and connection string, 138
cursors, 106, 107
GetString method, 141-148
LockType options, 107-116
Open method, Options parameter in,
165-166
opening, 105-106
parent, 171, 172
and Shape language, 170
Redirect, 79, 113, 223, 224, 231, 371, 372, 428
redirection file, 371
References, 103, 295
Referer, 262, 381
Refresh, 42
Refresh HTML Template, 38, 39
Register, 125-126, 127
Registration, 304
Registry, 20, 37
RELATE, 171, 172
relational database management system. See
RDBMS
"Relational Model of Data for Large Shared
DataBanks, A'' (Codd), 105
relative_url, 385-386
Releaselnstance, 31,239
Reload,42
remarks
Address, 459
Application, 457
BodyFormat, 478
Class,457
ContentBase, 461
ContentlD, 461
ContentLocation, 462
Importance, 470, 480
MailFormat, 481
MessageFormat,470,489
Name,460
Parent, 458
Session, 459
Source,463
JYpe,460,463,486
Remote Data Objects (RDO), 95, 113
Remote Queue, 291
REMOTE_ADDR, 75, 354, 426
REMOTE_HOST, 426
REMOTE_USER, 426
Remove,235,378
RemoveAll, 235
removeComma, 205
Rename,48
Replace, 129
Reply-To, 292, 294
ReportTo, 450
Request For Comments (RFC) 821, 289
Request For Comments (RFC) 822, 292, 296,
297
Request For Comments (RFC) 1867, 264
request headers, 262
Request object, 57, 58-68, 423-427
and Application object, 82
and BrowserType object, 88
and checkboxes, 71
e-mail, 319
file uploading, 260, 263, 264, 265, 266, 270,
276,283
and form splitting, 152
and HTML form elements, 211
and QueryString, 72
and record insertion, 128, 149
security, 354, 363
and Server object, 81
state management, 239,241
Request.Form, 67, 128,265
Request.Form(ElementName), 69
Request.Form("Title"), 70
Request.Form.ltem, 67
Request.Form.ltem(ElementName), 69
Request.QueryString, 371
Request.ServerVariables, 75
Request.ServerVariables(key), 75
Request.TotalBytes, 265
REQUEST_METHOD, 426
Resent-Bee, 295
Resent-Cc, 295
Resent-From, 293
Resent-Message-ID, 295
Resent-Reply-To, 294
Resent-Sender, 293-294
Resent-To, 294
RESET, 264,416
Reset, 200, 384
reset, 197
515
Index
Respond
and Custom Webltems, 51, 54
file uploading, 268
form splitting, 152
and HTML Template Web Items, 36, 45, 50
and Request object, 63, 65, 66
state management, 224, 229, 230, 233-234,
251,254
Response object, 76-79, 427-428
and Application object, 82
and ASP files, 28-29, 57
and Custom Webltems, 52
and HTML Template WebItems, 34-35
and Lock'!ype options, 113
and QueryString, 73
and Request object, 67
and Server object, 81
state management, 223-224, 231, 239, 241
and WebClasses, 33, 79
Write method, 24, 34, 57, 123
Response.Redirect, 224
Response.Write, 33, 143
resultset, 105
return values
Add, 475, 488
Attachments, 468
GetDefaultFolder, 491
GetFirst, 476
GetLast, 476
GetNext, 477
Sender,472
Return-Path,292-293,294
REXX,5
Right$,271
Rnd,387
RollbackTrans, 98
roots, virtual. See virtual directories
RowDelimiter,l42
runtime,l0,226
runtime DU., 31, 79, 239, 285
runtime errors
"9006: Invalid path to HTML template," 51
"index out ofrange," 60
"Invalid operation on object while still
connecting,"l67
s
-S,l78
-s,l78
s_, 149
s_DateField, 149
s_FieldName,149
SafeArray, 265, 284
SA-Fileup, 284
<SAMP>,418
Sayflello,71-72,74
schedule file, 369
Schedule.txt, 371
screen width, 177
<SCRIPT>, 417
516
Scriptname,399,407
<script> tags, 190-193, 236-237
SCRIPT_NAldE,426
scripting DU., 285
ScriptTimeout, 274,428
scripts, 7
ScriptTimeout, 28, 80
scroll, 214
scrollO, 217
scrollMyself, 214-215
Search,80
SECURE,241
secure channels, 365-366
Secure Communications, 363, 364
Secure Sockets Layer. See SSL
Securities, 347
Security, 364
security, 345
accessrestrictions,353-354
asymmetric technology, 356
digital certificates, 357
secure channels, 365-366
SSL,354-355,357-365
Wmdows NT and Wmdows 2000 Servers,
345-353
Security Info, 364
<SELECT>, 419
SELECT, 416, 435, 447
Select,9, 70,100,497,500
select, 197
Select elements, 116-119, 174-180, 180,
207-209
self, 216
selfjob1,447,450-451
semicolons(;), 89, 139, 183-184, 187
Send,332,333,474,484
Send Email, 331
Sende~293-294,324,458,471-472
sending e-mails, 300-301, 331-333
Sendmail,289
SendTags, 42
Serbia,362
server database, 93
Serverobject,29,57,74,79,80-82,428-429
Server.GetLastError, 422
SERVER_NAldE, 365, 426
server_name,178
SERVER_PORT, 426
SERVER_PORT_SECURE, 363, 426
SERVER_PROTOCOL, 426
SERVER_SOFTWARE, 426
ServeriP, 381
ServerName, 381
SERVERNT0023,281
ServerPort, 381
servers, e-mail, 288-289. See also Web servers
server-side file uploading, 264-274
Server"ariables,l,2, 7,8,9,67,74-79,88,260,
263,283,354,363,423
Server"ariables 1, 493-496
Server\rariables 2, 493, 496
Server"ars, 5, 6
Index
Servicelnstance, 380
ServiceName, 380, 381
Session, 456, 458-459
Session ID, 85, 86, 87, 227-229, 230, 231, 237,
238
Session object, 57, 85--87, 429-430, 456
class property values, 457
e-mail, 299,302
immediate parent, 458
methods,490-492
properties,488-490
state management, 220, 226-234, 237, 239
Session_OnEnd, 237,238
Session_OnStart, 237,238
SessioniD, 430
Set, 378
Set-Cookie, 240
setCookie, 245, 246
SetLocaleiD, 484,491-492
setSelectlndex, 208, 209
setTimeout, 214, 215
setTimeoutQ, 217
setting, Value, 482
Setup,290,291,397,403,408
Setup Wizard, 389
setup.exe,393,400,408
setup.lst, 402, 403
Setup1 Files, 403
Shape command, 171, 172
Shapelanguage,170
Shared Files, 398-399
Simple Mail Transfer Protocol. See SMTP
Single Computer, 353, 354
single quotes, 128-129, 184
single table, retrieving data from, 435-442
Size, 324,472
<SMALL>,418
smallQ,218
single table, retrieving data from, 435-442
summary queries, 445-446
table data types, 433-434
updating data, 443-444
SQL Server, 3, 93, 94, 277, 452, 453
and Command object, 162
and Connection object, 97, 98, 101-103
and connection string, 139
and GetString method, 148
and Select elements, 175, 177, 178, 179, 180
SQL statements
and Command object, 160, 161, 162
file uploading, 281
record additions, 132
record insertion, 125, 149
record updating, 151
and Recordset object, 105, 108, 109, 113,
115,166
and Select elements, 178, 180
single quote factor, 128, 129
and stored procedures, 141, 144, 146, 148
SQL2, 433, 434, 447-448
SQL-92, 433
SQLOLEDB, 277, 281
SRI International, 296, 297
SSL (Secure Sockets Layer), 345, 356, 362, 363,
SMTP, 287,288,289,290--291,293,460
SMTP Messaging, 299
SMTP Server, 299, 300, 301, 302, 323, 327
SMTPLogon,343-344
SortTemp, 291
Source,24,25, 165,166,208,211,422,
462-463,464,483
source,466
sp_CheckProduct, 164
sp_GetCountryDescription, 162
<SPAN>,417
special characters, 413-414
Special Directory Access, 347
Special File Access, 347
Split, 226
splitQ, 218
SQL,433
data definition, 452-453
deleting rows of data, 444
inserting rows of data into table, 442-443
multiple tables, retrieving data from,
446-451
nullability, 434-435
starting delimiters, 266, 271, 272
State, 167, 168, 174
state management, 219-220
Application object, 234-235
cookies, 239-250
global.asa file, 235-238
hidden fields, 250--257
Session object, 226-234
URLData,220--226
WebClass object, 238-239
StateManagement, 31,239
StaticObjects, 83, 421, 429
Status, 368, 427
status, 216
stderr, 178
stored procedures, for speeding up code, 141
str, 204, 205
str.length, 204
Stream,432
Stream object, 95
strField1, 226
strField2, 226
strField3, 226
SMALUNT, 434
364
40-bit, 362
128-bit, 361
enabling
in server, 362-365
for Web site use, 357-358
for encryption, authentication, and data
integrity, 354-355
server configuration for, 359-362
standard input (stdin), 4
standard output (stdout), 4
Standard Setup Package, 392, 393-403
Start,31,33,225,230,235,254,268
517
Index
strFilepath, 280, 281
strHeader, 271, 272
strikeQ, 218
string data type, 194-195
String object, 194-195, 217-218
StringFormat, 142
strings, 205
strKeyName, 59
strKeyValue, 59
GetFirst, 476
GetLast, 476
GetNext, 477
HTML Text, 469
~portance,470,480
Inbox,488
Item, 465,475,487
Logoff,491
LogonSMTP, 491
~ailFormat, 480
~essageFormat, 470,489
str~essageUD,324
strName, 71
<STRONG>, 418
strSQL,127,128
Structured Query Language (SQL). See SQL;
SQL Server; SQL statements
<STYLE>,418
<SUB>,418
subQ,218
Subject,296,324,472,481,484
subject, 475
SlTB~,264,416
Subnrlt152,197,198,200,201,204,223,254
SubnrltDetails, 46, 47, 48, 49, 50
SubnrltDetails_RespondO, 51
substringQ,218
Sudan,362
S~Q,445
summary queries, 445-446
sun,216
Sun ~icrosystems, 183
<SUP>,418
supQ,218
SupplierllD, 453
Support, 400
Sumame,443
Sybase,3,149
Sybase Adaptive Server, 175, 277
Sybase SQL Server, 93
Sybase System 11, 103
symmetric technology, 356
synchronouscod~166
syntax
Add,466,475,487
JUidres~459,485
Application, 456
Application object, 421
ASPError object, 422
AttachFile, 482
Attachments, 468
AttachURL, 483
Bcc,477
Body,478
BodyFormat, 478
Cc,479
Class,457
ContentBase,461,468,479
ContentiD, 461, 469
ContentLocation,462,469,479
Count, 465, 474, 486
Delete, 464, 467, 474, 476, 486, 488
From,480
GetDefaultFolder, 490
518
~essages,467
Name,460,467,485,489
Outbox,490
Parent,458
ReadFromFile,464
Recipients, 471
Request object, 423
Response object, 427
Send, 474,484
Sender,471
Server object, 428
Session, 459
Session object, 429
SetLocaleUD, 492, 484
Size,472
Source,462
Subject, 472, 481
Text,473
TimeReceived, 473
TimeSent, 473
To,481
type,460,463,485
Value,482
Version, 482, 490
WriteToFile, 465
Syria,362
System DSN, 99, 101
T
-t, 178
tarray,280
t variable, 281
<TABLE>, 420
table data types, 433-434
table-alias, 171
TableName, 125
tablename.fieldname, 447
tables, 415-416,420
altering, 453
Browsertype object, 87
creating, 452
data shaping, 172
dropping,452-453
GetString method, 142, 143, 146
~L Template Webltems, 45
multiple, retrieving data from, 446-451
Select elements, 175
single, retrieving data from, 435-442
See also specific tables
Index
TagPrefix, 43
tags,6, 7,57,181,222,236-237
attributes connected to events, 45-46
colors, 414
connecting template elements to events,
44-45
custom, 40-44
and Custom Webltems, 51
documentstructure,412-413,417
and event handling, 197
forn1,48,416,419
frames and layers, 420
GetString method, 146
graphics,420
and HTML Template WebItems, 34-35, 37
hyperlinks, 414,419
images, 414
lists and definitions, 419
and Request object, 62
<script> and <head>, 190-193
and Select elements, 117
and Server object, 81
tables,415-416,420
text formatting, 413,418
WC@Action, 54
See also specific tags
Taliban, 362
Target, 47, 48
TargetFrame,371
<TBODY>, 420
TCP/IP, 75
<TD>,420
template_uri, 386
templates. See HTML Template WebItems
Tern1inate, 31,33
Test Data Source, 102
test. txt, 180
TEXT, 264, 416
Text,48,69,119, 122,128,207,209,277,370,
473
text,475
text files, 174-180,301,361
text forn1atting, 413, 418
text/plain, 275
<TEXTAREA>, 419
TEXTAREA, 416
<TFOOT>, 420
<TH>,420
Thawte Consulting, 357
<THEAD>, 420
TIME,434
time stamps, 357
time zone, 297
time_out, 178,179
Timeout, 87,430
Time~8,157,198,214,493,494,496
TimeReceived, 303, 324, 473
TimeSent, 303,324,473
TIMESTAMP, 434
TimeTaken, 381
<TITLE>,420
To,292,294,295,481
to-from, 195
toLowerCaseQ, 218
Tools, 37,368,385-387
Tools.ProcessForm, 387
top, 216
Total~es,59,266,270,426
toUpperCase, 195
toUpperCaseQ, 218
<TR>,420
transaction control, 433
Transact -SQL statements, 175
Transfer, 79, 80, 429
triggers,175, 176,215
trim,202-204
Trim$,202
<TT>,418
TYPE,264
Type,460,463-464,485-486
type,466,487
u
<U>,418
-U, 177
<UL>,419
underscore U, 442
Uniforn1 Resource Identifiers (URis), 259, 260
Uniforn1 Resource Locators. See URLs
UNION, 446-447
unique key, 131-133
United Kingdom dates, 207
United States dates, 207
UnitPrice, 452
Universal Data Access, 94
Universal Time (UT), 297
Unix,3,93,197,289,297,298
Unlock,84,421,422
upflag,215
UPDATE, 175, 176, 444
Update, 130, 131, 151
updating data, 443-444
UploadFile, 267, 268
UploadFile_Respond, 274
uploading. See file uploading
URIQuery, 382
URis (Uniforn1 Resource Identifiers), 259, 260
URIStem, 382
URLData, 74,220-226,229,230,231,324,327
URLEncode, 73, 82, 429
URLFo~52,53-54,63,65,117,220,224,365
URLs (uniforn1 resource locators), 78-79, 260,
370,426
User Agent header, 89, 91
user ID, 105, 251, 281
user name, 139,350,351,352
User-Agent, 262, 263
UserAgent, 382
<User-Defined-Field>, 297
User-Defined-Fields, 297
UserEvent, 36, 45, 51,54
UseriD, 97, 98, 246
519
Index
UserName, 382
Users, 108, 112, 131
users, validating, 319--321
UT. See Universal Time
uuencode,297,298
v
validateForrn,198,199,200,202
validateForrnO, 201
ValidateUser, 319--320
validation
for e-mail users, 319-321
input, 198-207
validation date, 357
Value, 70,170,171,277,482
valueN, 90
values,200
blank, 151, 198
default, 151
property, 90-91
retrieving, 69--74
<VAR>,418
var, 185
VARCHAR, 434
%variables, 177
variables, 185
global, 83
position, 214-215
VARIANT, 270
VarType,29
vbCr,25
vbCrU, 25, 266, 271, 272, 275
vbDate,473
.vbp files, 395
VBScript, 5, 6, 181,285
VerifYLogin,64,66, 110,112,243,244,254
VeriSign, 357
Version, 482, 490
via, 293
View,24,30
View Code, 23
VIP, 114-115
virtual directories,17-18, 19, 21,22
Virtual private Network (VPN), 11
VisitorCount, 83, 84
Visual Basic
form-based applications, 9--10
version 6.0, 7, 15-17, 95, 129
Visual Studio, 95, 389
w
-w,177
WC@,40-42
WC@Action, 54
WC@Login, 244, 255
WC@UserPassword, 255
WCAT. See Web Capacity Analysis Tool
wcCH3.ASP?WCI=LoginPage, 63
520
wcCH3.ASP?WCI=LoginPage&WCE=Respond,
63
WCE,49,50, 72,251
WCE=VerityLogin&amp,66
WCI,49,50, 72,73
wcNoState, 239
wcRetainlnstance, 31
WCU,49, 72,74,221,225-226,231
Web browsers, 1, 2, 412, 413, 414, 416
browserDefinition, 89--90
and code, 24, 25, 26
and cookies, 229--232, 245-250
defaultValueN, 91-92
e-mail, 320,332
file uploading, 263, 264, 267, 268, 274
and HTML Template Webltems, 37, 41, 42,
43,48,49
and Internet Service Manager, 11
JavaScript, 190, 195, 198, 211
Lock'!YPe options, 111
and QueryString, 72, 74
record insertion, 127
record updating, 134
and Request object, 59, 67
and Response object, 77, 78
security, 349, 351, 352, 355, 356, 358, 364
selection of, 54-55
and Server object, 81
and Session object, 85-86, 87
state management, 219, 220, 222, 223, 225,
229,234,237,239--240,241,242,
244,255,256
and WebClasses, 20, 32
Web Capacity Analysis Tool (WCAT), 5
Web servers, 1, 2
administration of, 11-13
and Application object, 83, 84
and ASP files, 28
and Browser'!YPe object, 88
andcode,24
and Connection object, 98
Content Linking component, 373
file uploading, 259, 265, 266, 267, 284
and HTML Template Webltems, 40, 41
and liS application installation,
407-408
and JavaScript, 181
locally configured, 178
Mylnfo component, 382
and Personal Web Manager, 21
security, 345, 355, 356, 358
access restrictions, 353-354
asymmetric technology, 356
digital certificates, 357
secure channels, 365-366
SSL,354-355,357-365
Wmdows NT and Wmdows 2000
Servers, 345-353
and Server object, 80
and ServerVariables, 74,76--77,78,79
and Session object, 85-86, 429
Standard Setup Package, 397
Index
state management, 219, 220, 227-228, 229,
231,238-239,240,241,250,254
virtual directories, 17-18
and WebClasses, 20, 32
Web Publishing, 407
Web sites, SSL use on, 357-358
WebClass Designer, 30
and Custom Webltems, 51, 52, 63--64, 66
and HTML Template WebItems, 35, 38, 46,
47,51
WebClass object, 220, 238-239, 254, 393
WebClass_Start, 33, 41, 71, 127,384
WebClass_StartQ, 24, 48, 57, 62, 152
WebClasses, 6--7, 10,493,497
and Application object, 84-85
ASP files, 27-30
and ASPError object, 57
code,23-26
and Connection object, 96, 101
creating, 15-17
and Custom Webltems, 53, 54
and databases, 93
e-mail, 304
file uploading, 268, 283
GetString method, 144
and HTML Template Webltems, 35, 36, 37,
39,45,49
installable components, 367,371,372,375,
377,378,379,382,384
lifecycle of, 31-33
and LockType options, 110, 112, 113
navigating between, 79-80
Application object, 82-85
Browser'IYPe object, 87-92
Server object, 80-82
Session object, 85-87
and QueryString, 72, 73
recordinsertion,126--127
renaming, 26--27
and Request object, 63, 65
and response object, 77, 78
running, 18-23
secure channels, 365-366
and Select elements, 117
state management, 219, 220, 225-226, 230,
235,243,244,247,251,254
virtual directories, 17-18
WebClassRuntime.WebClassManager
(MSWCRUN.DLL), 29
Webltems, 6, 10, 31, 152
Custom Webltems, 51
connecting HTML elements to, 52-54,
126
connecting tag attributes to, 46
Nextltem property, 54
and Request object, 63--64, 66
URLFor method, 52
e-mail,303,321,325
file uploading, 268
HTML Template WebItems, 34-37
connecting to, 50-51
editing, 37-44
and events, 44-45, 46-49
and tag attributes, 45-46
state management, 221, 229
See also specific Web Items
Weight,376
Welcome HTML template, 247-250
Wend, 186
WHERE,435,438,444,448,450
~hileloop,186,187,202
Mde messages, 179
Mid card characters, 89
Mldcards, 442
Win32,5
Win32Status,382
~do~,216
Wind~ object, 195, 196,214,215-217
Windo~ 95, 382
Wmdo~s 98, 11, 263, 382, 493
Windo~ 2000, 98, 299, 300
Windows 2000 Server, 3, 11, 13, 290, 291,
345-353
Windo~ Explorer, 21
Windo~s NT, 3, 4, 11, 12, 98, 101, 103, 179,
289,382,384
Wmd~s NT Challenge/Response, 346, 349,
350-351,352
Windo~s NT Server, 11, 290, 291, 345-353. See
also Collaboration Data Objects for
Windo~s NT Server
Windo~s NT Workstation 4.0, 11
Windo~ Scripting Host (WSH), 180
Mth, 187,200,293
~ksta_name, 178
Wordpad,38
World Wide Web Consortium (W3C), 411
Write,24,52,57, 73,123,175,428
WriteLogRecord,380
WriteTemplate, 36, 39, 40, 41, 51, 54, 152, 219,
220,224,225,244,254,255
WriteToFile,464-465
X
-X, 179
X400,287,288
xcCH2.asp, 49
xcRetainlnstance, 239
XHTML 1.0, 411
XML,411
xp_cmdshell,175,176,180
521
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )