I’d like to store a folder item in a database field for later use as preferences of an app. The problem is, that the database field has the type of a string. So if I try this, it doesn’t work:
fi = rs.Field("fi")
I was also thinking of storing only the URLpath or another type of path to the database and assemble the folderitem later. But paths are read only, and I don’t see a chance of adding a path to create a folderitem.
Is there a way to convert the string to the class of a folder item?
Dim f As FolderItem = GetFolderItem(YourPathVariable, yourPathMode)
Thanks Alex! Do I understand that right: yourPathMode would for example be URLPath? That doesn’t work, as the debugger says this method doesn’t exist. “URLPath” in quotation marks doesn’t work either. What am I missing?
Take a quick look at the documentation.
From there you can see that yourPathMode is supposed to be a constant. For URLPath, write:
Dim f As FolderItem = GetFolderItem(YourPathVariable, FolderItem.PathTypeURL)
That works, thank you so much.