AccountObject.Save() simply returnes false, how do i debug??

Hi

I'm making a small app for a Merak 10 server in C# .net, using the Merak API ("IceWarp Server COM")
This problem is pretty specific for this particular API, so the explanation below is written in the presumption that you (my potential savior) have some sort of experience with the Merak API.

I can change properties on accounts, and even delete them, and the .Save() Method works great

THE PROBLEM is when i create a new account, the .Save() Method returns false, but no Exception is cast and the "LastErr" field in the account-object is 0, so no help there either. Nothing is logged, basically I'm throwing rocks in the dark...

What am i not getting here?

I'm doing it like this:

if (!accountList.Contains(email))
{
AccountObject konto = domain.NewAccount(email);
if (konto != null)
{
bool res = konto.SetProperty("u_password", password);
res = res && konto.SetProperty("u_name", navn);
res = res && konto.SetProperty("u_alias", email);
res = res && konto.SetProperty("u_mailbox", email);
if (res)
res = res && domain.Save();

return res;

}
else return false;
}
else return false;

Open in new window


For reference, this works just fine:

AccountObject konto = domain.OpenAccount(emailID);
if (konto != null)
{
bool res = konto.Delete();
bool save = konto.Save();
return (res && save);
}
else return false;

Open in new window


Any help is much appreciated!  :)

/Julian
itfdriftAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

itfdriftAuthor Commented:
Update:
LastErr is -2 (not 0 as previously written), what does that tell me?
Where can i find some references for these error-codes?
0
itfdriftAuthor Commented:
... It was a license issue, problem solved
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
itfdriftAuthor Commented:
I scooped out some ErrorCode info from the API's delphi-code.
-2 suggests a license-issue, and it turned out to be just that. The code was working as it should.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.