DbiGetErrorString

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiGetErrorString

Return to chapter overview

C syntax

DBIResult DBIFN DbiGetErrorString (rslt, pszError);

Delphi syntax

function DbiGetErrorString (rslt: DBIResult; pszError: PChar): DBIResult stdcall;

Description

DbiGetErrorString returns the message associated with a given error code.

Parameters

rslt                Type: DBIResult                (Input)
Specifies the error code.

pszError                Type: pCHAR                (Output)
Pointer to the client buffer that receives the message string for the given error code.

Usage

This function maps an error code in rslt to the corresponding error string. For example, if DbiGetErrorString is called with the error code DBIERR_EOF, it returns the string "At End of Table." BDE keeps the error strings as Windows string resources, so the client can translate/customize them as needed (using a resource editor such as Resource Workshop).

Note:        This function has no context, so it is not limited to error codes that were returned by previous BDE calls. In contrast, DbiGetErrorInfo returns information only on the last error logged by BDE.

Prerequisites

The client must allocate a buffer at least as large as (DBIMAXMSGLEN+1).

DbiResult

Meaning

DBIERR_NONE

The error string was retrieved successfully.

See also

DbiGetErrorInfo, DbiGetErrorEntry, DbiGetErrorContext