Well, The problem is that I have a SQLLITE database file which has data and can be browsed in SQLITE browser. I want this file to be imported in my windows phone app so that I can bind my Lists.
I have been googling and trying for a solution but no luck yet.
public async void UpDatabase()
{
bool isDatabaseExisting = false;
try
{
StorageFile storageFile = await ApplicationData.Current.LocalFolder.GetFileAsync("DTEMPCounselling");
isDatabaseExisting = true;
}
catch
{
isDatabaseExisting = false;
}
if (!isDatabaseExisting)
{
StorageFile databaseFile = await Package.Current.InstalledLocation.GetFileAsync("DTEMPCounselling");
await databaseFile.CopyAsync(ApplicationData.Current.LocalFolder);
}
}
Problem with above code is it searches it in the emulator filesystem while my database file is in my C: drive.
Any suggestion how can I achieve this. Thanks.
Aucun commentaire:
Enregistrer un commentaire