Jisson
Jisson

Reputation: 1

How to make a checkbox selected when searching from database

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

Answers (1)

Paul Creasey
Paul Creasey

Reputation: 28824

Really depends on your db access approach, one example.

 checkbox1.Checked = reader.GetBoolean(ordinal);

Upvotes: 1

Related Questions