2009年5月29日

Delphi OLEDB ErrorCode

在使用 OLEDB 發生錯誤時,可以用 ErrorCode 來做錯誤處理
ErrorCode 定義在 Unit OleDB 中

// Invalid accessor
//
DB_E_BADACCESSORHANDLE = HResult($80040E00);
...
// Unable to write with a read-only accessor
//
DB_E_READONLYACCESSOR = HResult($80040E02);
...
// Given values violate the database schema
//
DB_E_SCHEMAVIOLATION = HResult($80040E03);
...
// A literal value in the command could not be converted to the
// correct type due to a reason other than data overflow
//
DB_E_CANTCONVERTVALUE = HResult($80040E07);
...
// The command contained one or more errors
//
DB_E_ERRORSINCOMMAND = HResult($80040E14);
...
// A specified value violated the integrity constraints for a column or
// table
//
DB_E_INTEGRITYVIOLATION = HResult($80040E2F);
...

沒有留言:

網誌存檔