'MFC'에 해당되는 글 2건

SQL Error Code

[04] programming 2009.02.19 09:20
MFC Library Reference
CDBException::m_nRetCode

Contains an ODBC error code of type RETCODE returned by an ODBC application programming interface (API) function.

Remarks

This type includes SQL-prefixed codes defined by ODBC and AFX_SQL-prefixed codes defined by the database classes. For a CDBException, this member will contain one of the following values:

  • AFX_SQL_ERROR_API_CONFORMANCE   The driver for a CDatabase::OpenEx or CDatabase::Open call does not conform to required ODBC API Conformance level 1 (SQL_OAC_LEVEL1).
  • AFX_SQL_ERROR_CONNECT_FAIL   Connection to the data source failed. You passed a NULL CDatabase pointer to your recordset constructor and the subsequent attempt to create a connection based on GetDefaultConnect failed.
  • 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_DYNASET_NOT_SUPPORTED   A call to CRecordset::Open requesting a dynaset failed. Dynasets are not supported by the driver.
  • AFX_SQL_ERROR_EMPTY_COLUMN_LIST   You attempted to open a table (or what you gave could not be identified as a procedure call or SELECT statement) but there are no columns identified in record field exchange (RFX) function calls in your DoFieldExchange override.
  • AFX_SQL_ERROR_FIELD_SCHEMA_MISMATCH   The type of an RFX function in your DoFieldExchange override is not compatible with the column data type in the recordset.
  • AFX_SQL_ERROR_ILLEGAL_MODE   You called CRecordset::Update without previously calling CRecordset::AddNew or CRecordset::Edit.
  • 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_MULTIPLE_ROWS_AFFECTED   You called CRecordset::Update or Delete for a table with no unique key and changed multiple records.
  • AFX_SQL_ERROR_NO_CURRENT_RECORD   You attempted to edit or delete a previously deleted record. You must scroll to a new current record after a deletion.
  • 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_NO_ROWS_AFFECTED   You called CRecordset::Update or Delete, but when the operation began the record could no longer be found.
  • AFX_SQL_ERROR_ODBC_LOAD_FAILED   An attempt to load the ODBC.DLL failed; Windows could not find or could not load this DLL. This error is fatal.
  • AFX_SQL_ERROR_ODBC_V2_REQUIRED   Your request for a dynaset could not be fulfilled because a Level 2-compliant ODBC driver is required.
  • AFX_SQL_ERROR_RECORDSET_FORWARD_ONLY   An attempt to scroll did not succeed because the data source does not support backward scrolling.
  • AFX_SQL_ERROR_SNAPSHOT_NOT_SUPPORTED   A call to CRecordset::Open requesting a snapshot failed. Snapshots are not supported by the driver. (This should only occur when the ODBC cursor library — ODBCCURS.DLL — is not present.)
  • AFX_SQL_ERROR_SQL_CONFORMANCE   The driver for a CDatabase::OpenEx or CDatabase::Open call does not conform to the required ODBC SQL Conformance level of "Minimum" (SQL_OSC_MINIMUM).
  • AFX_SQL_ERROR_SQL_NO_TOTAL   The ODBC driver was unable to specify the total size of a CLongBinary data value. The operation probably failed because a global memory block could not be preallocated.
  • AFX_SQL_ERROR_RECORDSET_READONLY   You attempted to update a read-only recordset, or the data source is read-only. No update operations can be performed with the recordset or the CDatabase object it is associated with.
  • SQL_ERROR   Function failed. The error message returned by the ODBC function SQLError is stored in the m_strError data member.
  • SQL_INVALID_HANDLE   Function failed due to an invalid environment handle, connection handle, or statement handle. This indicates a programming error. No additional information is available from the ODBC function SQLError.

The SQL-prefixed codes are defined by ODBC. The AFX-prefixed codes are defined in AFXDB.H, found in MFC\INCLUDE.

신고
블로그 이미지

Moonistar moonistar

VARENUM

[04] programming 2008.06.16 09:03

// VARENUM usage key,

//

// [V] - May appear in a VARIANT.

// [T] - May appear in a TYPEDESC.

// [P] - may appear in an OLE property set.

// [S] - May appear in a Safe Array.

//

//

VT_EMPTY            [V]   [P]         // Not specified.

VT_NULL               [V]                // SQL-style Null.

VT_I2               [V][T][P][S]      // 2-byte signed int.

VT_I4               [V][T][P][S]      // 4-byte-signed int.

VT_R4               [V][T][P][S]      // 4-byte real.

VT_R8               [V][T][P][S]      // 8-byte real.

VT_CY               [V][T][P][S]      // Currency.

VT_DATE               [V][T][P][S]      // Date.

VT_BSTR               [V][T][P][S]      // Automation string.

VT_DISPATCH         [V][T]   [S]      // IDispatch.Far*

VT_ERROR            [V][T]   [S]      // Scodes.

VT_BOOL               [V][T][P][S]      // Boolean; True=-1, False=0.

VT_VARIANT            [V][T][P][S]      // VARIANT FAR*.

VT_DECIMAL            [V][T]   [S]      // 16 byte fixed point.

VT_RECORD            [V]   [P][S]      // User defined type

VT_UNKNOWN            [V][T]   [S]      // IUnknown FAR*.

VT_I1               [V][T]   [S]      // Char.

VT_UI1               [V][T]   [S]      // Unsigned char.

VT_UI2               [V][T]   [S]      // 2 byte unsigned int.

VT_UI4               [V][T]   [S]      // 4 byte unsigned int.

VT_INT               [V][T]   [S]      // Signed machine int.

VT_UINT             [V][T]   [S]      // Unsigned machine int.

VT_VOID                  [T]            // C-style void.

VT_HRESULT               [T]                                   

VT_PTR                  [T]            // Pointer type.

VT_SAFEARRAY            [T]            // Use VT_ARRAY in VARIANT.

VT_CARRAY               [T]            // C-style array.

VT_USERDEFINED         [T]            // User-defined type.

VT_LPSTR               [T][P]         // Null-terminated string.

VT_LPWSTR               [T][P]         // Wide null-terminated string.

VT_FILETIME               [P]         //FILETIME

VT_BLOB                     [P]         //Length prefixed bytes

VT_STREAM                  [P]         //Name of the stream follows

VT_STORAGE                  [P]         //Name of the storage follows

VT_STREAMED_OBJECT         [P]         //Stream contains an object

VT_STORED_OBJECT         [P]         //Storage contains an object

VT_BLOB_OBJECT            [P]         //Blob contains an object

VT_CF                     [P]         //Clipboard format

VT_CLSID                  [P]         //A Class ID

VT_VECTOR                  [P]         //simple counted array

VT_ARRAY            [V]               // SAFEARRAY*.

VT_BYREF            [V]

VT_RESERVED

신고

'[04] programming' 카테고리의 다른 글

Debugging Lab Seminar movie  (0) 2008.11.27
Thread 스케줄링  (0) 2008.10.02
Memory Map(From MSDN)  (0) 2008.09.23
Process & Activity & Task  (0) 2008.08.04
RMI-IIOP  (0) 2008.07.22
Calling Convention  (1) 2008.06.16
VARIANT  (0) 2008.06.16
VARENUM  (0) 2008.06.16
Thread 스케줄링  (0) 2008.06.13
Source Safe 연결 해제 방법  (0) 2008.06.13
Memory  (0) 2008.06.13
블로그 이미지

Moonistar moonistar

Tag MFC, varenum