here is my code
这是我的代码
private void button1_Click(object sender, EventArgs e)
{
try
{
string connectionString = @"Data Source=|DataDirectory|\Database_POS.sdf";
using (SqlConnection connection = new SqlConnection(connectionString))
using (SqlCommand command = connection.CreateCommand())
{
command.CommandText= "INSERT INTO Customer (Email) Values (@email);";
command.Parameters.AddWithValue("@email",textBox_Email.Text);
connection.Open();
command.ExecuteNonQuery();
}
}
catch (SqlException ex)
{
Console.WriteLine(ex.Message);
}
}
private void button