Handle to imageResource by noteID

I am trying to get a handle to imageResources (db-design) in order to (selectively) delete them from my database.

my code:


dim nc as notesNoteCollection

set nc = mydb.CreateNoteCollection(False)

nc.SelectImageResources = True

Call nc.BuildCollection

strId = nc.GetFirstNoteId

set imgdoc = mydb.Getdocumentbyid(strId)


The strId gets filled just fine, the imgdoc stays empty

Is this the wrong way to go about?

Arthur

Update: method works fine on views, not on forms, agents or … imageResources. Question remains :frowning:

Subject: handle to imageResource by noteID

Works just fine for me.

Do you use Option Declare? From your code excerpt I cannot tell if all variables are declared as they should be.

Subject: RE: handle to imageResource by noteID

Hi,

You were right, the method works just fine.

Typical case of too fast coding.

I accessed my “curDb” instead of “otherDb” from which the noteID was retrieved.

Apologies to those who spent time on this question …

Arthur