https://learn.microsoft.com/en-us/xamarin/android/data-cloud/data-access/using-sqlite-orm
at last I found this
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
How can I loop through sqlite table, I can view
Data in ListView using xaml, but I want to deal with each row individually , example display each BookTitle in displayAlert.
using System;
using System.IO;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace App1
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class MainPage : ContentPage
{
string dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "database.db3");
public MainPage()
{
InitializeComponent();
}
protected override async void OnAppearing()
{
listView.ItemsSource = await App.Database.GetBooksAaync();
}
}
}
Hello,
As the documentation you found, you can use the following steps for looping each record:
Step1: Get the records from a table in database.
Step2: Use foreach
to loop each record.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.