dimanche 14 février 2016

How to connect on SQLite Database (Windows Phone)

Ok so lets say i have my Database.db file that i have as resource to my project and is located in my projects folder.

private SQLiteConnection dbConn;
public string DB_PATH = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "Database.db");

    public void connecttoDb()
    {
        dbConn= new SQLiteConnection(DB_PATH);
    }

What this does is actually creates a new database somwhere in virtual storage of the emulator, and it doesn't actually connects to my existing Database.db

I tried to set path to Database.db file but whatever i try it gives the null exception. please any help

Aucun commentaire:

Enregistrer un commentaire