Errata

ADO:  ActiveX Data Objects

Errata for ADO: ActiveX Data Objects

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 7
6th paragraph "Business component"

It is on the book: "... access component(ADO, RDO, ODBC, OLE, or ADO),...

Should be: "... access component(DAO, RDO, ODBC, OLE, or ADO),...

Anonymous   
Printed Page 38
3rd line of Example 3-2

Seems to be a superfluous underscore in C++ example, which generates a compiler
ignore for the rename.

P.S. I also get a Compiler warning for this:
d:9781565924154debugmsado15.tlh(409) : warning C4146: unary minus operator applied to
unsigned type, result still unsigned

Anonymous   
Printed Page 65
Example 4-7, Case adModeRead

The example code reads:

Case adModeRead
sPermissions = "User cannot read data."
Case adModeWrite
sPermissions = "User cannot write data."
Case adModeReadWrite
sPermissions = "User cannot read nor write data."

I believe that the code should read as follows:

Case adModeRead
sPermissions = "User can only read data."
Case adModeWrite
sPermissions = "User can only write data."
Case adModeReadWrite
sPermissions = "User can both read and write data."

Anonymous   
Printed Page 94
"Keyset Cursor" section, paragraphs 1 and 4

The last sentence of the first paragraph describes the keyset cursor as "the most
resource-intensive cursor available in ADO."

The fourth paragraph suggests just the opposite; "Use the keyset cursor instead of
the dynamic cursor whenever possible to conserve resources."

You can't have it both ways!

Anonymous   
Printed Page 100
First Line

"&" is not a bitwise operator in VB but a concatenation operator. The "And" is both a
bitwise and a logical operator in VB.

The line on the top of page 100 should read:
If (rst.State And adStateOpen) Then rst.Close

("&" is a bitwise operator and "&&" is a logical operator in JavaScript, Java, and
C++, etc.)

Using method on page 100 to check if the state is closed would open up another can of
worms.

If 9781565924154Rs.State And adStateClose Then
' This would never be executed
' because it would never evaluate to True (non-zero)
End If

If (bitState And bitTest) = bitTest Then
' This would work if you were testing to see
' if a particular bit was on but would not work
' if you were tying to see if that bit was off
End If

If (bitState And 0) = 0 Then
' This statement would always execute thereby rendering
' the if block worthless
End If

If 9781565924154Rs.State = adStateClosed Then
' This will work provided each state is mutually exclusive.
' Or, if you really wanted to test for a simply closed recordset.
End If

Since the states are numbered 0, 1, 2, 4, 8, rather than say 0, 1, 2, 3, 4, I would
tend to think they are not mutally exclusive. For example, I can picture a recordset
being open and fetching at the same time. I can also picture a recordset being closed
and in the process of connecting.

If 9781565924154Rs.State = adStateOpen Then
' Might give an unexpected result if the state was both open
' and fetching when all you cared about was whether the
' recordset was open or not.
End If

Each programming situation would have to be examined independently. The example on
page 100 would be fine as:

If (rst.State And adStateOpen) Then rst.Close

Anonymous   
Printed Page 107
First code segment, line 7

Error : Until
Correction : Loop

Anonymous   
Printed Page 116
1st paragraph, line 4

Error : BOF property is True when the record pointer is past the last
record in the recordset

Correction : EOF property is True when the record pointer is past the last
record in the recordset

Anonymous   
Printed Page 117
Code example at bottom of page

The first 2 lines of page 118 describe the code example at the bottom of page 117 as
having "a call to the MoveLast method" that "moves the record pointer to the end of
the recordset."

In fact the code example at the bottom of page 117 doesn't have a call to the
MoveLast method at all.

Anonymous   
Printed Page 121
2nd and 3rd lines...Typo replication of a command.

The top 3 lines of page 121 reads as follows:

End If
m_rst.MoveNext
m_rst.MoveNext

Now, it is unknown to me if this was compliant with the ADO code of the time, but
when I write this (using VisualStudio6), the program won't work until I erase the
superfluous m_rst.MoveNext command.

Anonymous   
Printed Page 139
Table 5-16

The adRecModified enumeration description says "Indicates that the record was not
modified."

I believe the opposite is true.

(Note: at the very end of the table on page 140 the adRecUnmodified enumeration reads
precisely the same, "Indicates that the record was not modified."

Anonymous   
Printed Page 144
Code snippet on the fourth and fifth lines from the top of the page.

Code snippet reads;

Debug.Print rst.Fields!Author.Value
Debug.Print rst.Fields!Author

I could be mistaken, but I think you intended to use the dot operator rather than the
exclaimation point.

Anonymous   
Printed Page 159
Table 7-1,

in the description of the adCmdTableDirect value. In the second sentence

"This value is very similar to that of adCmdFile except that the ..."

It looks like "adCmdFile" should be "adCmdTable".

Anonymous   
Printed Page 176
The very first line of text.

The first line of text reads as follows;

txtNumericScale.Text = par.Direction

As written, this places the enumeration value of the Direction property (0, 1, 2, 3, or 4) in the textbox
for the NumericScale prop
erty. I believe the line should read as follows;

txtNumericScale.Text = par.NumericScale

Anonymous   
Printed Page 183
Paragraph starting with "All Will events have..."

The phrase "Will/Connect pairs" should probably read "Will/Complete pairs" instead.

Anonymous   
Printed Page 220
About 10 lines down from top of page in the code example

The line that reads;

Set mshFlexGrid.Recordset = rec

should read as follows;

Set mshFlexGrid.Recordset = rst

Anonymous   
Printed Page 221
Second code snippet from the top of the page, (or the first complete one of

the page);
sSource proberty asignment results in invalid 86th character, which is the ; at the
end of the fourth line of code. Should be:
& " APPEND (TABLE [Orders Details] "

Anonymous   
Printed Page 234
Chapter 9.4, the prjAccessExample, we found a couple of minor

problems in the code. Fortunately, the shaping code worked correctly!

In the PopulateOrderDetailInformation method, line 8, I removed
"rstOrderDetails" from the beginning of the line.

In the Form_Unload method (page 230), line 10, I changed rst to rstCustomers.

Anonymous   
Printed Page 328
Line 15 & 18

Line 15 references Table F-1 which doesn't exist.

Line 18 references Table G-1 which doesn't exist.

Anonymous   
Printed Page 348
Field.Name Property

In the example listed for Field.Name it reads a set value= field.GetChunk(NumBytes).
I think it should read fieldName = field.Name.

Anonymous   
Printed Page 413
of ADO: ActiveX Data Objects, Jason T. Roff, June 2001, there is a

mistake.
Under the Recordset.CursorType Property, it reads
"recordset.CursorLocation = cursorLocation"
I'm sure you meant
"recordset.CursorType = cursorType"

Anonymous   
Printed Page 421
Note Section

The note section which is describing the recordset.GetRows method actually pertains
to the Recordset.Find method, which is listed on the opposite page. The note, which
reads "Not all providers support the Find method." appears to be meant for
Recordset.Find, as there is no mention on relying on .Find using GetRows.

Anonymous   
Printed Page 428
Arguments: CursorType(CursorTypeEnum) secion

Default value for CursorType is said to be
adLockReadOnly
which is not a CursorTypeEnum

Anonymous   
Printed Page 469
second line

HAVING (COUNT(Make) < 1);

the '<' should be a '>'

Anonymous   
Printed Page 472
DISTINCTROW section

This example does NOT work in Microsoft Access 2002. However, the predicate DISTINCT
does produce the desired behavior

Anonymous   
Printed Page 473
first UNION example

In the query, the table should be Sales, not Employees

Anonymous   
Printed Page 476
INSERT ... INTO example section

The example appears to be backwards. On pg 475, the
first sentence reads "...for appending a single record
...", and the first example shows how to append
MULTIPLE records. On page 476, the second paragraph
has the sentence "for appending multiple records..."
when multiple should be single. The example using the
VALUES keyword fails in Microsoft Access 2002 because
the text values (Chevy, Cavalier and Teal) should be
enclosed in double-quotes. In the book, they are not
enclosed in double-quotes.

Anonymous   
Printed Page 484
Footnote

The footnote indicates that all code examples in the book are available for
download from the book's web site, <http://www.oreilly.com/catalog/9781565924154/>,
but I can find no code or any other type of download at that location.

Anonymous