Nativepath

When i store in an text field of mysql db, a nativepath of folderitem, when i retrieve it with command getfolderitem(recordset.field), in window work perfectly, in mac os this tecnique not work.

Suggestions or a bug ?

Thanks

In Windows, the native path and absolute path are the same. On the Mac, they are not so you have to be specific.

GetFolderItem( rs.Field, FolderItem.PathTypeNative )

Watch out for encodings too… Make sure when you read the data back, you set the encoding back to UTF-8.

Storing paths is not the best way to do it, I would suggest you take a look at “FolderItem.GetSaveInfo” as should retain a more reliable path, i.e. if the user moves the file or renames it a standard path will break.

Sam’s point is a good one, and you should strongly consider his advice. The SaveInfo will act like an alias tracking the file around the hard drive. It’s also a good way to track files internally that a user might move between the times you need to access it. For example, the user opens a document that opens a window in your app, moves the file, then makes changes in your app and saves. Unless you track the file that was originally opened, you’ll end up saving to the wrong place.