Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error adding categories to node

Status
Not open for further replies.

Pilsieboy

Programmer
Sep 12, 2007
8
NL
Hi all,

I try to add a document to a folder. I created all the required attributes of the category but I always get this error:

Statuscode=101107
Message=Error adding categories to node
ErrorMessage=Error inserting rows to the data table.
API error=

Could not create document (CreateObjectEx Failed).

I already used the code for another folder with another Category. That works fine. Any ideas?

Thanks in advance!
Regards, André
 
Update:

I found the problem: some values of the attributes were of an incorrect type.

A new problem comes up. For attributes with Type = -1 (string) everything goes fine. So for the following attribute OwnerName, it works well.

A<1,?,DisplayLen=32,Required=true,DisplayName=OwnerName,Type=-1,MaxRows=1,RegionName=Attr_34893_13,NumRows=1,ID=13,Search=true,Length=32,FixedRows=true>,



Can anyone tell me how to add attributes to a category with the types -7 (date??) and 2 (??)?

A<1,?,Required=true,DisplayName=DateReceived ontvangst,Type=-7,MaxRows=1,TimeField=false,RegionName=Attr_34893_10,NumRows=1,ID=10,Search=true,FixedRows=true>,

A<1,?,Required=false,DisplayName=DocumentNumber,Type=2,MaxRows=1,RegionName=Attr_34893_15,NumRows=1,ID=15,Search=true,FixedRows=true>,


Type -7 seems to be a date but this doesn't work:
DateTime DateReceived = DateTime.MinValue;
if (AddAttribute(attr, catVersion, "Date received", DateReceived, true) != 0)
ThrowException(session, "AddAttribute Failed");

Don't know what Type 2 is. This doesn't work:

string DocumentNumber = string.Empty;
if (AddAttribute(attr, catVersion, "Document number", DocumentNumber, false) != 0)
ThrowException(session, "AddAttribute Failed");

Really appreciate some help.
Best regards, Andre
 
Hi appnair,

Yes I'm using LAPI. I managed to solve the date issue. The solution is:

if (AddAttribute(attr, catVersion, "Date received", DateReceived.ToString("s"), true) != 0) ThrowException(session, "AddAttribute Failed");

The other problem remains. Really don't know how to get that one fixed... I know that it's not a string. String is type -1 and this is Type 2.

The fourth argument only takes a string as the inputtype so there must be another solution to this. Any ideas?
 
2 is integer.I have put the full list here it is a scree cap which you may find useful,it is a document in my PWS at the KB.


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top