вот код
SqlConnection sqlCon = new SqlConnection(@"Мои Даные");
try
{
string Query = "INSERT INTO dbo.SalaryDate VALUES ('@date', '@rate', '@day')";
sqlCon.Open();
using (SqlCommand cmd = new SqlCommand(Query, sqlCon))
{
cmd.Parameters.AddWithValue("@date", "15.01.1998");
cmd.Parameters.AddWithValue("@rate", 40);
cmd.Parameters.AddWithValue("@day", 2);
cmd.ExecuteNonQuery();
}
sqlCon.Close();
}
catch(Exception m)
{
MessageBox.Show(m.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}