This function returns one of the following values:
0 if successful.
1 if the specified attribute is not part of the entry.
-1 if an error occurred.