Public Function DeleteParentObjectLinksToItem(Optional ByVal Parent As Variant, Optional ByVal Child As Variant) As Long
' Remove the link between the Parent and Child
Dim SQLStatement As String
On Local Error Resume Next
If pvtCollectionEmulationMode Then
DeleteParentObjectLinksToItem = True
Exit Function
End If
Err = 0
' delete the row from the DBAwareObjectLinks table
SQLStatement = _
"DELETE FROM " & TableName() & " WHERE FromObjectType = '" & _
Parent.ObjectType & "' AND FromObjectID = " & _
Parent.ObjectID & " AND ToObjectType = '" & _
Child.ObjectType & "' AND ToObjectID = " & _
Child.ObjectID
' check for illegal Object
If Err = 91 Then
DeleteParentObjectLinksToItem = False
Exit Function
End If
pvtDatabase.Execute SQLStatement
If Err <> 0 And Err <> 3078 Then '
pvtErrorMessage pvtDBAwareCollection.Name & " received a database error while attempting to remove an object containment link (Delete)."
DeleteParentObjectLinksToItem = False
Exit Function
End If
DeleteParentObjectLinksToItem = True
End Function
Public Sub SetDatabaseParameters(Optional ByVal Database As Variant, Optional ByVal DBAwareCollection As Variant, Optional ByVal CollectionEmulationMode As Variant)