I am using Notes 8.5 and trying to run an agent that uses the C API. The function I am using is as follows:status = NSFNoteDelete(hDb, 40790, UPDATE_NOSTUB). I always get the error 540 which is This function is inappropriate for filesystem directories. I have also tried this with NSFNoteOpen and got the same 540 error. The notes id is a valid noteid converted from a hex value to a long. Any ideas?
Subject: Sounds like your handle is pointing to a directory and not a database
My guess…
You may have done your NSFDbOpen against a directory which is allowed and you get back a Handle but when you try to do Note operations against that Handle you are getting an error indicating its not allowed against a directory.
Subject: That worked
Thanks John. I was not using OSPathNetContstruct but just using dbserver & “!!” & dbFilePath and it appears that r* has removed that. Once I began to use OSNetPathConstruct it is now working. Thanks for you insight.