ErrorEntry.Add method

AutoCAD Map 3D ActiveX

ErrorEntry.Add method

Adds a diagnostic parameter to the error.

Add( Source As EAdeClassId, _
 Message As String, _
 SQLStatement As String, _
 Position As Long _
 ) As DiagParam

Returns the added diagnostic parameter.

Source

Identifies the object that caused the error.

Message

A message string describing the error.

SQLStatement

The SQL string, if SQL processing caused the error.

Position

The position of the error in an SQL string.

The following example adds a diagnostic parameter to an error entry object.

 

Dim diapm As DiagParam

 

On Error GoTo ErrHandler

' Some error occurs while accessing the SQL database

' ...

Exit Sub

ErrHandler:

Set diapm = amap.ErrorStack.Item(0).Add(122, "incorrect syntax", _

"SELECT * FROM RECORD3", 5)