HOW TO FETCH DATA FROM SQLITE CORRESPONDING TO AN ID

some1some1 Member ✭✭✭
edited June 24 in Xamarin.Forms

I have saved some information in sqllite and how can i fetch data from sqllite corresponding to an id.

Answers

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭
  • yelinzhyelinzh Member, Xamarin Team Xamurai

    Get the data using Query.

    string dpPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "Location.db3");
    var db = new SQLiteConnection(dpPath);
    var dataTables = db.Query<DataTable>("SELECT * FROM Items WHERE Id = ?", "A");
    
Sign In or Register to comment.