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!

Updating Custom Attributes thru LAPI

Status
Not open for further replies.

renreyes

Programmer
Jan 28, 2002
3
CA
I'm doing this in VB right now, but I won't mind a solution using other language, I could probably just port the code.

Though I'm able to retrieve their values, I'm having trouble updating the Custom Attributes.

my code is pretty much like this: (initialization codes omitted)

status = LL_ListObjects(session, parentVol, parentID, "DTree", vbNullString, LL_PERM_READ, files)
status = LL_GetNumberOfObjects(session, parentVol, parentID, fileCount)
For i = 0 To fileCount - 1
status = LL_TableGetInteger(files, i, "ID", fileID)
status = LL_TableGetInteger(files, i, "VolumeID", fileVol)
creationDate = GetMsoFileCreationDate(filePath)
lYear = year(creationDate)
lMonth = month(creationDate)
lDay = day(creationDate)
lHour = hour(creationDate)
lMinute = minute(creationDate)
lSecond = second(creationDate)
'ContributedDate is a custom attribute
status = LL_TableSetDateEx(files, i, "ContributedDate", lYear, lMonth, lDay, lHour, lMinute, lSecond)
Next i

i also tried something like:
status = LL_GetObjectInfo(session, fileVol, fileID, objInfo)
status = LL_ValueSetFieldDateEx(objInfo, "ContributedDate", lYear, lMonth, lDay, lHour, lMinute, lSecond)
status = LL_UpdateObjectInfo(session, fileVol, fileID, objInfo)

also didn't reflected the update.

I have no clue.
 
oops! my blunder, please ignore this part:
"i also tried something like:
status = LL_GetObjectInfo(session, fileVol, fileID, objInfo)
status = LL_ValueSetFieldDateEx(objInfo, "ContributedDate", lYear, lMonth, lDay, lHour, lMinute, lSecond)
status = LL_UpdateObjectInfo(session, fileVol, fileID, objInfo)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top