Visual C++ ERRATA.WRI Part 1-2: Class Library ReferenceLast reviewed: July 22, 1997Article ID: Q117739 |
|
1.50
WINDOWS
kbreadme
The information in this article applies to:
SUMMARY This article is a reproduction of parts 1 and 2 of the ERRATA.WRI file distributed with Microsoft Visual C++, version 1.5. The Visual C++ setup installs ERRATA.WRI in the MSVC\HELP directory. MORE INFORMATION
Part 1: Notes on Class Library Reference
Part 2: Notes on Database Classes
Step 2 of the procedure "To specify a filter for a recordset object"
contains two lines of code. In both code lines, add single quotation
marks around the literal string "MATH101". For example:
m_pSet->m_strFilter = "CourseID = 'MATH101'";
For an explanation, see the "Caution" on page 31.
Under the section "SQL Statement Construction," after the following paragraph:
To override the default SELECT statement, pass a string containing a
complete SELECT statement when you call Open. Instead of constructing
its own default string, the recordset uses the string you supply. If
your replacement statement contains a WHERE clause, don't specify a
filter in m_strFilter because you would then have two filter
statements. If your replacement statement contains an ORDER BY
clause, don't specify a sort in m_strSort so that you will not have
two sort statements.
add the following "Caution" note:
*Caution*
In the Enroll tutorial application, filter strings typically use a
parameter placeholder, "?", rather than assigning a specific literal
value, such as "MATH101", at compile time. If you do use literal
strings in your filters (or other parts of the SQL statement), you
may have to "quote" such strings with a DBMS-specific "literal
prefix" and "literal suffix" character (or characters). For example,
the code in this section uses a single quote character to bracket the
value assigned as the filter, "MATH101". You may also encounter
special syntactic requirements for operations such as outer joins,
depending on your DBMS. Use ODBC functions to obtain this information
from your driver for the DBMS. For example, call ::SQLGetTypeInfo for
a particular data type, such as SQL_VARCHAR, to request the
LITERAL_PREFIX and LITERAL_SUFFIX characters. If you are writing
database-independent code, see Appendix C in the ODBC Programmer's
Reference for detailed syntax information.
In the list of values that can be returned in the CDBException::m_nRetCode data member, add the following values (alphabetically):
* AFX_SQL_ERROR_DATA_TRUNCATED You requested more data than you have
provided storage for. For information on increasing the provided data
storage for CString or CByteArray data types, see the nMaxLength
argument for RFX_Text and RFX_Binary under "Macros and Globals."
* AFX_SQL_ERROR_LOCK_MODE_NOT_SUPPORTED Your request to lock records
for update could not be fulfilled because your ODBC driver does not
support locking.
* AFX_SQL_ERROR_NO_POSITIONED_UPDATES Your request for a dynaset
could not be fulfilled because your ODBC driver does not support
positioned updates.
* AFX_SQL_ERROR_ODBC_V2_REQUIRED Your request for a dynaset could
not be fulfilled because a Level 2-compliant ODBC driver is required.
In the description of the CRecordset::GetStatus member function, change the description of m_lCurrentRecord to the following:
Contains the zero-based index of the current record in the recordset,
if known. If the index cannot be determined, this member contains
AFX_CURRENT_RECORD_UNDEFINED (-2). If IsBOF is TRUE (empty recordset
or attempt to scroll before first record) then m_lCurrentRecord is
set to AFX_CURRENT_RECORD_BOF (-1). If on the first record, then it
is set to 0, second record 1, and so on.
Add the indicated information below to the Remarks for the CRecordset functions listed below:
IsFieldDirty p. 224
IsFieldNull p. 225
IsFieldNullable p. 225
SetFieldDirty p. 234
SetFieldNull p. 235
Add the following:
Using NULL for the first argument of the function will apply the
function only to outputColumns, not params. For example, the call
SetFieldNull(NULL);
sets only outputColumns to NULL. Params will be unaffected.
To work on params, you must supply the actual address of the
individual param you want to work on (i.e.
SetFieldNull(&m_strParam)). This means you cannot set all params
NULL, as you can with outputColumns.
In the description of the forwardOnly option for the nOpenType parameter to the CRecordset::Open member function, delete the word "dynaset". (A forward-only recordset allows forward scrolling only, does not allow updates, and should not be considered a dynaset.)
|
Additional reference words: 1.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |