Hi folks,
I getting an error when i try to get database members to datagridview. The error i get is unhandled exception 'source' more detail is not there.
The method i use:
public int LaadData(DataGridView dgv)
{
string SQL = "SELECT * FROM Persoon";
using (var dt = new DataTable())
{
using (SQLiteCommand cmd = new SQLiteCommand())
{
//cmd.Connection = con;
//cmd.CommandText = SQL;
SQLiteDataAdapter da = new SQLiteDataAdapter(SQL, con);
da.Fill(dt);
}
dgv.DataSource = dt; // error
}
con.Close();
return dgv.Rows.Count;
}Hopefully another knows the correct answer.
Rinaldo
Greetings from Amsterdam the Netherlands