sqlsearch = "Select * from Students where student_dob =@dob" Dim da As New SqlDataAdapter(sqlsearch, con) da.SelectCommand.Parameters.AddWithValue("@dob", DateTimePicker1.Value) da.Fill(ds) con.Close() If ds.Tables(0).Rows.Count = 0 Then MessageBox.Show("No record exists, try again", "SORRY!", MessageBoxButtons.OK) Else populate_lvw1() End If
da.SelectCommand.Parameters.AddWithValue("@dob", DateTimePicker1.Value.Date)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)