DeleteDataDef

Called to delete a dataclass from the cabinet .

Public Function DeleteDataDef(ByVal DataDefId As Long, ByVal DelFlag As Integer) As Long

 

Parameters

In/out

Name            

Data type

Description

In

 

DataDefId

Long

Index of the dataclass to be deleted

In

DelFlag

Integer

Deletion Flag '0' to indicate deletion of the dataclass

 

Description

This function is called form local and shared cabinet. It is called in shared cabinet from Admin and in local cabinet from desktop. This function is called when any dataclass is deleted.

 

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 DatclassId      As  Long

Dim DelFlag          As  Integer

Dim gPDb             As PanDb.pdbCls

Set gPDb = New PanDb.pdbCls

DataclassId = 15

DelFlag = 0

 

lRetVal=gPDb.DeleteDataDef (DataClassId,DelFlag)

If lRetVal <> NG_SUCCESS Then

    MsgBox gPDb.ErrDescription, vbInformation

     Screen.MousePointer = vbNormal

End If