con = new SqlConnection("Data Source=ADMIN\\SQLEXPRESS;Initial Catalog=PhysioCure; Integrated Security=true"); con.Open(); DateTime dtmain = System.DateTime.Now; cmd = new SqlCommand("select PationName,ContactNo from Physio_cureTable where DateOfBirth like '" + dtmain.Date.ToString().Substring(0, 5) + "%'", con); SqlDataReader reader = cmd.ExecuteReader(); while (reader.Read()) { label18.Name = reader.GetInt32(0).ToString(); label18.Text = reader.GetString(3).ToUpper(); label19.Text = reader.GetString(5).ToUpper(); } reader.Close(); con.Close();
Name
DateTime
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)