09-08-2008 12:56 PM
I am getting this error when calling ActFwk.Users.CreateUser(strUserName, "password", ActFwk.Roles.Role_Standard, contact, Act.Framework.Users.Status.Active, false, false, false, false, false, true, true, false);
The excecption message is "Application Failure". The funny thing is this code works in development, and for the most part it works at our customer site as well. For instance it creates 3 users successfully, but then for some reason it throws this exception. I am unable to find any documentation on Act.Data.ActDb.ActDbException in the sdk resource kit provided to us. The message "Application Failure" is of absolutly no use. I thought I would iterate through the Errors collection of this exception, but since I can't find any documentation on this, I have no idea what type of Object the Errors Collection contains.
Anyone have some suggestions?
09-11-2008 04:49 PM
"Errors" returns a ActDbErrorCollection which is a collection of ActDbError objects. These objects are publicly visible in the Act.Data.ActDb namespace. An ActDBError is merely an abstraction to capture the essense of either a System.Data.SqlClient.SqlError or a System.Data.OleDb.OleDbError so you don't have to worry which one was thrown. If you look up those objects on MSDN you can get a better feel for what kind of data an ActDBError would contain. The "Source", "Message", and "ErrorCode" properties of any AcrtDbError you find should give you a clue as to where to look next. The "Message" and "ErrorCode" are the most meaningful and correspond to the SqlError "Message" and "Number" properties.