vendredi 10 avril 2015

Sqlite3.Open always returns CannotOpen

I am trying to access skype local database using C# and sqlite but my tries always fail Here is the connection code :-



StorageFolder sf = Windows.Storage.ApplicationData.Current.LocalFolder;
string k = Path.GetDirectoryName(sf.Path);
k = k.Substring(0, k.LastIndexOf('\\'));
k = k + '\\'+ "Microsoft.SkypeApp_kzf8qxf38zg5c" + '\\'+ "LocalState" + '\\' + "goldenwingsonline";
var path = Path.Combine(k, "main.db");
using (var db = new SQLite.SQLiteConnection(path))
{
string change = string.Empty;
try
{

}
catch (Exception ex)
{
}
}


The code always returns CannotOpen within the sqlite class specifically at this line of code



var r = SQLite3.Open (databasePathAsBytes, out handle, (int) openFlags, IntPtr.Zero);


Although the path is correct but when i try to open it within file-explorer It Error while opening main.db through file-explorer


Any help please ?


Aucun commentaire:

Enregistrer un commentaire