DeleteReference
Called when a reference of folder or document is to be deleted.
Public Function DeleteReference(ByVal ParentId As Long, ByVal ObjectId As Long, ByVal ObjectType As String) As Long
Parameters
In/out |
Name |
Data type |
Description |
In |
ParentId |
Long |
Index of parent of the object whose reference is this |
In |
ObjectId |
Long |
Index of the object to be deleted |
In |
ObjectType |
String |
Type of object 'F' for folder and 'D' for document |
Description
It is called when reference of a folder or a document is deleted. The parameter object type is used to convey whether it’s a folder reference or document reference.
Return value
Name |
Description |
1 |
In case of success |
-1 |
Invalid operation |
-2 |
Invalid operation in read only cabinet |
-3 |
Cabinet not connected |
Example
Dim ParentId As Long
Dim ObjectId As Long
Dim ObjectType As String
Dim lRetval As Long
Dim gPDb As PanDb.pdbCls
Set gPDb = New PanDb.pdbCls
ParentId = 46
ObjectId = 78
ObjectType = “D”
lRetVal=gPDb.DeleteReference(ParentId,ObjectId,ObjectType)
if lRetVal <> NG_SUCCESS Then
MsgBox gPDb.ErrDescription, vbInformation
Screen.MousePointer = vbNormal
Endif