BlairW

Writing to AF Tables

Discussion created by BlairW on Jul 22, 2011
Latest reply on Jul 22, 2011 by hanyong

Hi

 

I'm having a small problem with writing to AF tables via the AF SDK. This should be quite straightforward but I am getting the following error message occasionally when I try to write to an AF table:

 

Table 'WorkListMessages' with UniqueID '74d86574-b5e0-4110-b26f-34b72a5d55c6' is locked by user NT AUTHORITY\SYSTEM.

 

The application is running as an ACE application and is single threaded (aside from ACE of course). Here is the code that I am using:

 
Dim dr As DataRow
        dr = flow2EDatabase.Tables(WORKLIST_MESSAGES_TABLE).Table().NewRow()
        dr("ElementGUID") = workListItemToAdd.AssociatedElement().ID().ToString()
        dr("Date") = workListItemToAdd.ItemDate().Date()
        dr("AttributeName") = attributeName
        dr("Type") = workListItemToAdd.ItemType().ToString()
        dr("Status") = workListItemToAdd.ItemStatus().ToString()
        dr("Message") = workListItemToAdd.DisplayMessage().Trim()
        dr("User") = workListItemToAdd.Username().Trim()
        flow2EDatabase.Tables(WORKLIST_MESSAGES_TABLE).Table().Rows().Add(dr)

 Any help would be much appreciated.

 

Thanks

 

Blair

Outcomes