Errata for Professional Active Server Pages 2.0   [ISBN: 1-861001-26-6]

Wrox Logo
Chapter Page Details Date Print Run
  3 HTML tags should be in upper case
"Despite being recommended in the HTML 4.0 standard that tags should be
specified in lower case, for ease of reading we have chosen to display
HTML tags in upper case throughout the book and all script in lower case."

I don't think the WWW Consortium would agree with You regarding this
statement. Here's a quotation from the HTML 4.0 standard:

"Element names are written in uppercase letters (e.g., BODY). Attribute
names are written in lowercase letters (e.g., lang, onsubmit). Recall that in
HTML, element and attribute names are case-insensitive; the convention
is meant to encourage readability."

So You're text would be more accurate like this:

"As being recommended in the HTML 4.0 standard and for ease of reading
we have
chosen to display HTML tags in upper case throughout the book and all
script
in lower case."
26-Jun-98 1
  28 If not it
A new ODBC database connection is only establish IF the pool ...

"it" is there now instead of "if"
12-Oct-98 1
  60 Repeated Screen Shot
On page 60 the screen shot at the top of the page is accidently duplicated at the bottom of the page. However, nothing is missing, it was just an accidental repeat.
25-Aug-98 1
  73 Missing letter d at start of 4th code block
In the fourth block of code there is a missing 'd' at the beggining of the line
so:

atFirstDay = DateSerial (intThisYear, intThis Month, 1)

should read

datFirstDay = DateSerial (intThisYear, intThis Month, 1)

Thanks to Gregor McHardy for pointing out this error.

25-Aug-98 1
  74 typo
Then we check to see if the value of intPrintDay is greater that the last day of the month

Should read

Then we check to see if the value of intPrintDay is greater than the last day of the month

13-Mar-01 1
  83 Arrows the wrong way around
the diagram on page 83 under the section "Overall
Object Model Structure".

From the direction of the arrows, the diagram seems to indicate that the
Request object's data comes from the SERVER and is sent to the CLIENT
and that the Response object's data comes from the CLIENT and goes to
the SERVER. They should be reversed!
26-Jun-98 1
  95 Should use POST method, not GET in example at bottom of page.
In the code example on page 95 you should use METHOD="POST" on the first line. Not GET as it suggests for the form to work properly.


22-Oct-98 1
  96 Incorrect Code
On page 96 in the second grey box the line which reads

strComps = Request.Form("numComps")

should read

strComps = Request.Form("grpnumComps")

and in the first grey box on page 97 instead of

Request.Form("numComps")(1)
Request.Form("soft")(1)

the code should read

Request.Form("grpnumComps")(1)
Request.Form("grpSoft")(1)
25-Aug-98 1
  100 No = sign in VBScript function
On the seventh line of the second grey box on page 100 the = sign should be ommitted, so

if inStr(uAgent, "4.") >= 0 then

should read

if inStr (uAgent, "4.") >0 then
26-Aug-98 1
  129 Unsupported characters with MapPath
Despite the claims after the last example on p.129, MapPath does not
support "..", or so my server tells me:

Server.MapPath() error 'ASP 0175'

Disallowed Path Characters

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/importnewemp.asp, line 27

The '..' characters are not allowed in the Path parameter for the
MapPath method.
25-Jun-98 1
  130 Set instead of Var
The code fragment incorrectly uses the var keyword in object reference
assignment instead of the VBScript set keyword. The text below the code
fragment correctly says "Notice the use of the set keyword...".
22-Jul-98 1
  131 Application Object diagram should not show properties.
On page 131 the diagram at the bottom shows Properties for the Application Object. It should not show this as there are not any.

Thanks to Stephane Bertin for poitning this out.
22-Oct-98 1
  133 Variable names do not match
There is a variable in the first grey box

Application.Value("DateTime") = Now()

which, in the second grey box is different

response.Write(Application("startDateTime"))

one of these must be changed for consistency so that they both match

so the second one should now become

response.Write(Application("DateTime"))

26-Aug-98 1
  135 Quotes not closed in second code box.
The second code box on the bottom half of page 135 has a closing quote mark missing after objASPEXT. The box should read:

<%
Set Application("objASPEXT")=Server.CreateObject("ASPEXT.BrowserType")
%>


17-Oct-98 1
  140 Wrong Session Property
In the second section of code on page 140, the session property is incorrect.

For Each staticItem in Session.Contents

should read

For Each staticItem in Session.staticObjects

Thanks to Brian Becker for pointing out this mistake.

25-Aug-98 1
  142 Incorrect Method
the Methods window of the ObjectContext box should read
SetComplete and SetAbort. Instead of SetAbort the box reads SetAbandon.
The text on the following page is correct however.
24-Jun-98 1
  165 Text Stream object example will not show error
In the last paragraph, we say that the function WriteToLogFile is supposed to return True on success, and False otherwise. But because of the:

On Error Resume Next

clause, the last line of the function body

WriteToLogFile = True

always executes and the function returns True.

You should use:

If Err.number<>0 Then WriteToLogFile = True

or as a shortcut,

WriteToLogFile = (Err.number<>0)

instead.

13-May-99 1
  179 IIS 4.0 component object call
If you download the Content rotator component from IIS 4.0 the correct object call should be

Set objMyContent = Server.CreateObject("IISSample.ContentRotator")

Thanks to Todd Lewis for pointing this out.
26-Aug-98 1
  181 AdRotator's TargetFrame property
This note concerns the suggested syntax for the TargetFrame property (line 6):

objAdRot.TargetFrame="fraAdFrame"

If you use this syntax, you may find that the the TARGET attribute of the <A> tag is not generated as expected.

Instead, try the following syntax:

objAdRot.TargetFrame="TARGET=""fraAdFrame"""

Or, to be more 'tidy', you could use this:


QUOT = Chr(34)
objAdRot.TargetFrame="TARGET=" & QUOT & "fraAdFrame" & QUOT


Thanks to Cory Healey


06-Oct-99 1
  183 Adredirect.asp not Adot.asp
On page 183 of ASP 2.0 the examples on the page use AdRedirect.asp as
the page used as the redirection file but the text below refers to
Adrot.asp.
25-Jun-98 1
  198 Reference to missing Chapter 12
In the Active Server Components chapter, there is a reference to a chapter 12 "Building Sever Components". Unfortunately this chapter was deemed not of high enough quality to go into the book and was removed before publication. The information on building server components can be found at the end of chapter 6 and in chapter 16. There is no extra information on the Permission Checker Component. Keep your eyes peeled on the web site for extra information on building server components which will appear shortly.
22-Jul-98 1
  236 "Options" is a parameter of the Open method not of an ADO recordset
"Options" is a parameter for the Open method of an ADO recordset. It is not a property of an ADO recordset. The code as listed at the top of page 236 generates an error, so you could define the properties of the recordset, then use the "Options" parameter of the Open method:

Set oRs = Server.CreateObject("ADODB.Recordset")
oRs.Source = "Contact"
oRs.ActiveConnection = "Contacts"
oRs.Open , , , , adCmdTable

Assuming, of course, that you've defined the constant adCmdTable elsewhere in the page, or have included adovbs.inc.

Thanks to Todd Lewis for pointing this out.
15-Mar-99 1
  240 Set SkipCurrent to True for successive finds.
The line

???If performing successive finds you would generally want to set SkipCurrent to False???

should??read

???If performing successive finds you would generally want to set SkipCurrent to True???

Thanks to Stephen Korow for pointing this out.
12-Oct-98 1
  246 Extra closing delimeter
In the bottom code section on P 246 there is one too many closing delimeters, remove the one after the line:

oConn.Execute(strSQLStatement)

Thanks to Jakob Hussfelt for pointing this out to us.
15-Dec-98 1
  263 Missing Line near bottom of p263
On page 263, at the bottom, there is a line gap in the code example.
In the blank line you should add:

rsAddMessage.AddNew
01-Feb-99 1
  270 3rd line p270 - incorrect code
The third line of code on page 270 which reads:

Set oRS = oConn.Execute(Query)

Should read

Set oRS = oConn.Execute(strQuery)

Thanks to Stephen Korow for pointing out this error.
01-Oct-98 1
  344 SQL Syntax Error
In the second grey box at the bottom of page 344 the first SQL statement that reads

strSQL = "SELECT UserName, UserPword FROM UserDetails WHERE UserName = '" _
& Request.Form("txtUserName") & "')"

should read

strSQL = "SELECT Username, UserPword FROM UserDetails WHERE _
(Username ='" & Request.Form("txtUsername") & "')"

Thanks to Jeff Briggs for pointing out this mistake.
25-Aug-98 1
  428 Modal not Model
The 1st paragraph of page 428 (after the "code snippet") states

The dialog box is displayed using the showModelDialog method of the
window object. It should be the showModalDialog method (Modal, not Model)
25-Jun-98 1
  457 Complete text for TRANSREC table
The TransactionID field should be declared both Int and
Indentity.
The book only has "Int". If you leave off the "Identity" when
you
create the table, the ODBC error you get is "The column
TransactionID in table TRANSREC may not be null." Here's the
complete text for creating the TRANSREC table:

create table TRANSREC (
TransactionID Integer Identity,
TransactionType Char(5),
SourceAccount Int,
DestinationAccount Int,
Amount Money,
TransTime DateTime
)

30-Jun-98 1
  478 Incorrect code
The relational logic in the shaded box in the bottom of the
page is incorrect. The line that reads

if Left(CStr(cWithdrawl),5) <> "ERROR" or cWithdrawl <>
xferAmt then

should read

if Left(CStr(cWithdrawl),5) <> "ERROR" and cWithdrawl =
xferAmt then

Similarly, the line that reads

if Left(CStr(cDeposit),5) <> "ERROR" or cDeposit <> xferAmt
then

should read

if Left(CStr(cDeposit),5) <> "ERROR" and cDeposit = xferAmt
then

30-Jun-98 1
  505 Public Key Not Private
There is an error at page 505 in the schema "Signed document" :
decrypt must use public key obtained from CA and not the private as
indicated.
24-Jun-98 1
  523 Not all of the e-commerce code is printed.
Please note, the e-commerce case study does not feature all of the code in the printed copy. It is an accompaniment to the download file.

To see all of the code you need to download the zip file from the Web site http://webdev.wrox.co.uk/books/1266/

We apologise for any confusion that this may have caused.

You can also download further installation instructions should you require them, availabe from the same site.
14-Dec-98 1
  883 RecordAsObject
The third code block reads:

myRSObj = RecordAsObject(rs);
myRSObj.X = "ABC"
myRSObj.Y = "123"
myRSObj.Z = "999"

Should read:

myRSObj = RecordAsObject(rs);
myRSObj.X = "GHI"
myRSObj.Y = "789"
myRSObj.Z = "777"
23-Apr-01 1