I have this code to retrieve data from a database to text boxes on my form.
String SLCT = "SELECT * FROM clients WHERE client_code=@client_code";
NpgsqlCommand Select = new NpgsqlCommand(SLCT, conn);
Select.Parameters.AddWithValue("@client_code", client_code);
conn.Open();
using (NpgsqlDataReader read = Select.ExecuteReader())
{
while (read.Read())
{
client_nameTextBox.Text = (read["client_name"].ToString());
client_addresTextBox.Text = (read["client_addres"].ToString());
}
conn.Close();
How do I do the same for check boxes?
Datatype in the database is Boolean.