try { // here i try to retrieve date =date.today from sql table; con.Open(); cmd.CommandText = "select Login_Date from LoginObserver where Login_Date =" + System.DateTime.Today; cmd.ExecuteNonQuery(); con.Close(); } // if error enter into the catch block catch { /* this is my code for sending ..but i have not put entire code /*code for sending message*/ sm.sendSMS("number", messagetext); insert into table where date = datetime.now; con.Open(); cmd.CommandText = "Insert Into LoginObserver values('" + 1 + "','" + System.DateTime.Today + "')"; cmd.ExecuteScalar(); con.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)