HypGetErrorInfo

Describes the Oracle Smart View for Office VBA function, HypGetErrorInfo.

Data provider types: All

Description

HypGetErrorInfo() behaves as a lookup table for error strings, returning meaningful strings for most of the documented error codes.

Note:

  • Many negative error codes will return "Unsupported error"; this assumes that these codes are no longer in use.

  • Some error codes will return "Check Last Error from provider for more information". In these cases, you must use the HypGetLastError VBA function for more error information.

Syntax

Public Declare PtrSafe Function HypGetErrorInfo Lib "HsAddin" (ByVal vtErrorCode As Variant, ByRef vtErrorMessage As Variant) As Long

ByRef vtErrorCode As Variant

ByRef vtErrorMessage As Variant

Parameters

vtErrorCode: Error code for which information is needed

vtErrorMessage: Output error message for the respective error code

Return Value

Returns 0 if successful; otherwise, returns the appropriate error code.

Example

Sub TestErrorInfoVBA()
ss = 20000 'some error code returned by a smart view vba
If Not ss = 0 Then
   Dim ErrInfo
   HypGetErrorInfo ss, ErrInfo
   MsgBox ErrInfo
End If 
End Sub