Wednesday, July 15, 2009

.NET SDK Development Error

I have a strange issue while developing a .NET application with the BusinessObjects Enterprise XI 3.1 SDK/API.

I am trying to delete users from the repository which is a fairly straightforward task. The problem is that I receive an error message with the following text:

ERROR: User.RemoveUsers():System.Runtime.InteropServices.COMException (0x80041E09):Failed to commit objects to server :Delete operation failed.
at CrystalDecisions.Enterprise.ISInfoStore.Commit(ISInfoObjects InfoObjects)
at CrystalDecisions.Enterprise.InfoStore.Commit(InfoObjects infoObjects)
...

Here are an excerpt of the C# source code lines causing the error:

...
IObjects.Delete(IObject);
IStore.Commit(IObjects);
//IObject.DeleteNow();
...

First you make an delete of the InfoObject (which is a User object in this case) by using the Delete() method of the InfoObjects collection. The next source code line commits the deletion back to the repository (database) using the Commit() method of the InfoStore object. The error occurs when trying to commit.

I have also tried to use the commented source code line, the DeleteNow() method of the InfoObject object, but with the exact same problem.

For the fun of it I translated the source code to VBScript using COM SDK in WSH instead with the exact same source code lines. This worked without any problem. VBScript source code excerpt shown below:

...
oInfoObjects.Delete(oUser)
oInfoStore.Commit(oInfoObjects)
...

To make it even more interesting I translated the code to Java. The code for deleting users in Java is the very same. And it also worked without any issues. Java source code excerpt shown below:

...
infoObjects.delete(infoObject);
infoStore.commit(infoObjects);
...

I have also tried to compile and run the .NET version of my application in a BOE XI R2 environment but with no luck, the same error message occured.

So my question is: There must be something I am missing here - can someone explain what I am doing wrong?

2 comments:

tharuni said...

thanks dude, iam so cool after finding your blog information, its really usefull to me thank you so much.
who are want to learn SAP BO Online Course

Unknown said...

Please update new posts with good information and thanks for the sharing sap bo info.
SAP BO Online Training