WHY there is a database error? help

  • 31 October 2006
  • 7 replies
  • 2 views

Badge +2
I creat a process instance with c#.net code, but when i run it, the connection is good but an exception will be catch at "creat process instance", and error message is "An database error occured ."

Is something wrong? who can help me?

code :

System.Security.Principal.WindowsImpersonationContext impersonationContext;
impersonationContext = ((System.Security.Principal.WindowsIdentity)User.Identity).Impersonate();

SourceCode.K2ROM.Connection oK2Connection = UIController.NewOpenK2Connection();
SourceCode.K2ROM.ProcessInstance oNewProcessInstance;
oNewProcessInstance = oK2Connection.CreateProcessInstance("TrainingApproveTrainee");

7 replies

Badge +11
Any errors logged in K2Error.txt? I've seen this once where the K2Server Service account did not have permissions to write to K2Error.txt in K2.net's Bin folder.

Regards,
Ockert
Badge +2
icon-quote.gifOckert:
Any errors logged in K2Error.txt? I've seen this once where the K2Server Service account did not have permissions to write to K2Error.txt in K2.net's Bin folder.

Regards,
Ockert


very appreciate for your help.
there is nothing in K2Error.txt And i think it maybe a problem with configuration? because i can run these code successfully in another environment. but i don not know where is wrong
Badge +11
If there's nothing in the K2Error.txt file, the K2Server Service account probably couldn't right to it. Make sure the this account has got 'Modify' permissions on K2.net's Bin folder (normally 'C:Program FilesK2.net 2003Bin')

- Ockert
Badge +2
I have give that account Modify authority accroding to your way, but the problem is still alive, what can i do? i am very confusing, by the way my K2 server and its' database are distributed
Badge +11
Now that you've given the account the appropriate permissions - any errors in K2Error.txt?

Also, have a look at your Error Profiles in K2.net Service Manager. Create a new profile which will show 'ALL' errors and see if you get any errors there.

Regards,
Ockert
Badge +2
Sorry, i think there is no use of your process, because there is no process instance running at all, so there have nothing to do with the "error profiles", because those are associated with process instance and i have no process instance at all. am i right?

Do u think this error is associate with k2 database user account? because when my K2 server and database use in one machine, the program run correctly. Or any other reason, do u have another way?
Badge +8
Have you had a look at the following post?

http://forum.k2workflow.com/viewtopic.php?t=262

Reply