RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DB.DatabaseErrorFmt Function

Creates and raises an EDatabaseError exception with a formatted error message.

Pascal
procedure DatabaseErrorFmt(const Message: WIdeString; const Args: array of const; Component: TComponent = nil);
C++
DatabaseErrorFmt(const BSTR Message, const array of const Args, TComponent * Component = nil);

DB

Call DatabaseError to raise an EDatabaseError exception. The error message for the exception is assembled from the format string specified by the Message parameter and applying the Args parameter. In C++, the Args_Size parameter specifies the index of the last argument in Args (one less than the number of arguments). If a component is provided as the final parameter, the message is prefixed by the name of the component to help in interpreting the error message.In C++, this parameter can be NULL. 

Call DatabaseErrorFmt rather than creating and raising the exception directly in code to reduce the overall code size of the application. 

 

DbiError 

DatabaseError

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!