private void button4_Click(object sender, EventArgs e)
{
{
SqlConnection conn = new SqlConnection("Data Source=user-PC;Initial Catalog=URBAN-AUTO-CLINIC;Integrated Security=True;User Instance=False");
SqlDataAdapter adaptor = new SqlDataAdapter();
DataTable table = new DataTable();
DataSet ds = new DataSet();
adaptor.SelectCommand = new SqlCommand("SELECT FirstName,LastName FROM ClientNCar WHERE FirstName ='" +txtFName.Text +"'AND LastName='"+txtLName.Text+"'",conn);
adaptor.Fill(ds);
ClientSearchDisplay.DataSource = ds.Tables[0];
}
}
`Hie all My name is Eric.
with the above code I am trying to searc for a record usinf textboxes but all I get is empty columns after the button is event is performed