You can do that with a single query:
UPDATE
AddMember
SET
Status = 'Expired'
WHERE
Subscription_Expire < GetDate()
;
You are storing your dates as one of the date types[^], and not as strings, right? If not, fix that first, before you run into the significant problems that come with dates stored as strings.
NB: Your application should
never connect to the database as
sa
. That is an unlimited user which could be used to take over your server, and possibly your network. Create a specific user which has only the privileges your application needs, or use Windows authentication.
const string constring = "Data Source=LENOVO-PC\\SUMIT;Initial Catalog=Ngo_Mgmt;Trusted_Connection=True;";
const string query = @"UPDATE AddMember SET Status = 'Expired' WHERE Subscription_Expire < GetDate();";
using (var connection = new SqlConnection(constring))
using (var command = new SqlCommand(query, connection))
{
connection.Open();
command.ExecuteNonQuery();
}