Refer below code.
C#
private void Button84_Click(object sender, EventArgs e)
{
var sql = "UPDATE [dbo].[Table_infoname] SET [SpecialTotalPoints] = 0";
sql += ",[SpecialMonthPoints] = 4";
sql += ",[rasmeTotalPoints] = 0";
sql += ",[rasmeMonthPoints] = 12";
using (SqlConnection connection = new SqlConnection("Data Source=ABOAHMED;Initial Catalog=kankon;Persist Security Info=True;User ID=aboahmed;Password=12345;MultipleActiveResultSets=True"))
{
using (SqlCommand command = new SqlCommand(sql, connection))
{
connection.Open();
command.ExecuteNonQuery();
connection.Close();
}
}
}
VB.Net
Private Sub Button84_Click(sender As Object, e As EventArgs) Handles Button84.Click
Dim sql = "UPDATE [dbo].[Table_infoname] SET [SpecialTotalPoints] = 0"
sql += ",[SpecialMonthPoints] = 4"
sql += ",[rasmeTotalPoints] = 0"
sql += ",[rasmeMonthPoints] = 12"
Using connection As New SqlConnection("Data Source=ABOAHMED;Initial Catalog=kankon;Persist Security Info=True;User ID=aboahmed;Password=12345;MultipleActiveResultSets=True")
Using command As SqlCommand = New SqlCommand(sql, connection)
connection.Open()
command.ExecuteNonQuery()
connection.Close()
End Using
End Using
End Sub