Log Database
D2000 VBApi - Log database
Contents of the log database of the D2000 System may be browsed in two ways:
Records for one (particular) object.
Records for objects, that match the given mask and describe the particular type of action.
To get the records of one object, call the function VBApiGetLogByObject.
Declaration
Declare Sub VBApiGetLogByObject Lib "vbapi.dll" Alias "_GetLogByObject@24" (Arr() As VBApi_TLogRec, ByRef name As String, ByRef bt As Date, ByRef et As Date, ByRef bCompletted As Long, ByRef ok As Long)Parameters
Arr | Array of log database records of VBApi_TlogRec. |
name | Name of object (must be opened by the function VBApiOpenObject). |
bt | Begin time of the interval for record selection. |
et | End time of the interval for record selection. |
bCompleted | Attribute, whether the array Arr contains all required records. |
ok | Return value - call success. |
Return value
Value of the parameter ok.
Return code | Meaning |
|---|---|
0 | Call successful. |
1 | Incorrect object name. |
2 | No logged on user. |
3 | Invalid parameters. |
4 | Internal error. |
Note
If the parameter bCompletted = 1 (data not completed - too much data), to get the remaining data it is necessary to call the function again with changed time bt according to the last record in the array Arr.
To get records of the objects that match the name mask and also describe some type of action, call the function VBApiGetLogByGroup.
Declaration
Declare Sub VBApiGetLogByGroup Lib "vbapi.dll" Alias "_GetLogByGroup@28" (Arr() As VBApi_TLogRec, ByRef mask As String, ByRef groups As Long, ByRef bt As Date, ByRef et As Date, ByRef bCompletted As Long, ByRef ok As Long)Parameters
Arr | Array of log database records of VBApi_TlogRec. | ||||||||||||||||||||||
mask | Object name mask. | ||||||||||||||||||||||
groups | Action type. Action type is given by a number, that is the sum of the following constants:
| ||||||||||||||||||||||
bt | Begin time of the interval for record selection. | ||||||||||||||||||||||
et | End time of the interval for record selection. | ||||||||||||||||||||||
bCompleted | Attribute, whether the array Arr contains all required records. | ||||||||||||||||||||||
ok | Return value - call success. |
Return value
Value of the parameter ok.
Return code | Meaning |
|---|---|
0 | Call successful. |
1 | Incorrect object name. |
2 | No logged on user. |
3 | Invalid parameters. |
4 | Internal error. |
Note
If the parameter bCompletted = 1 (data not completed - too much data), it is necessary to call the function repeatedly with the changed time bt according to the last record in the array Arr to get the remaining data.
Related pages: