Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public Form1()
  2. {
  3. InitializeComponent();
  4. cmd.Connection = con;
  5. }
  6.  
  7. private void Button1_Click(object sender, EventArgs e)
  8. {
  9. cmd.CommandText = "inster into Records(Name) values ('" + txtID.Text + "' )";
  10. con.Open();
  11. cmd.ExecuteNonQuery();
  12. con.Close();
  13. MessageBox.Show("Data has beed record.");
  14. }`
  15.  
  16. System.Data.SqlClient.SqlException: 'Incorrect syntax near the keyword 'into'.'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement