windows 8 - How to import a prepopulated SQLite DB in Document Folder in WinRT Tablet -
I have a pre-population SQite DB in the documents folder of the WinRT tablet. If I have this permission, then I can run it in App Localfolder How can i import it
To access the document library, you must upload an app to the company account. The personal account does not provide document accessibility.
- Then open Package.appxmanifest .
- Go to the Capabilities tab and check the Document Library .
- Go to the Announcements tab and enter any name in the File Type Association announcement
- Name field Add and add database extensions to supported file types, in my case I was using .sqlite .
- See the given screenshot below to read the entire story:
I will use the code given below.
Private async Task MoveOrcapDatabaseSync () {var LocalFolder = ApplicationData.Current. local folder; Var DbInDocument = KnownFolders.DocumentsLibrary.GetFileAsync ("db.sqlite") wait; // Moves the current file into the specified folder You will get the overloaded method here. Wait DbInDocument.MoveAsync (LocalFoulder, "Desired_Name_Here.sqlite", NameColisionOption.ReplaceExisting); // Creates a copy of the file in the specified folder. You will get overloaded method here. Var DbLocal1 = Wait DbInDocument.CopyAsync (LocalFoulder, "Desired_Name_Here.sqlite", NameColisionOption.ReplaceExisting); }
- Go to the Capabilities tab and check the Document Library .
Comments
Post a Comment