Reputation: 1
i created a form,containing fields emloyeeid,employeename,age...,and a checkbox. When searching using employeeid ,i want to the checkbox selected/deselected according to the value saved in the database(the checkbox field in database is boolean)
Upvotes: 0
Views: 155
Reputation: 28824
Really depends on your db access approach, one example.
checkbox1.Checked = reader.GetBoolean(ordinal);
Upvotes: 1