This is a migrated thread and some comments may be shown as answers.

[Solved] DatabaseLocation.Fullpath

1 Answer 107 Views
Data Storage for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dirk
Top achievements
Rank 1
Iron
Dirk asked on 13 Sep 2013, 09:31 PM
Have you an example how to create and use a database by using the option DatabaseLocation.Fullpath ?
I'm not sure if it is possible to use this option in a published Windows Store App.
By default it is not allowed to open a file outside the local or roaming storage section.
And if you want to access a file from 'outside' then you have to use the StorageFile class.

So again, do you have a working example for 'DatabaseLocation.Fullpath' and are you sure that you can use it in a published Windows Store app?

1 Answer, 1 is accepted

Sort by
0
Bulent
Telerik team
answered on 16 Sep 2013, 11:55 AM
Hi Dirk,

Thank you for your question.

The option DatabaseLocation.Fullpath can be used to create a database using the fully specified path to a file located in sub-folder of any isolated storage of Windows RT: local, roaming and temporary storage sections as you mentioned. This option is intended to be used in the case when you have a custom folders structure prepared in any of the available sections and you want to create a database file anywhere in this hierarchy. For example:

string fullPath = Windows.Storage.ApplicationData.Current.TemporaryFolder.Path + "\\ResourcesFolder\\DB_Storage\\BikesStore_DB_10.db3";
 BikesDatabase database = new BikesDatabase(fullPath, DatabaseLocation.Fullpath);

The database "BikesStore_DB_10.db3" will be created in "ResourcesFolder\DB_Storage" subfolder of the TemporaryFolder folder.

I hope this helps. If you have any other questions or suggestions, do not hesitate to contact us again.
 
Regards,
Bulent
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Data Storage for XAML
Asked by
Dirk
Top achievements
Rank 1
Iron
Answers by
Bulent
Telerik team
Share this question
or