Advertisement
Guest User

Untitled

a guest
Sep 12th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. OleDbConnection conn = new OleDbConnection(constring);
  2. try
  3. {
  4. conn.Open();
  5. OleDbCommand cmd = new OleDbCommand("INSERT INTO Clienti(ID,Nome,Cognome,[Data Nascita],Indirizzo,Citta,Cap,Piva,CodFiscale,Dominio) VALUES ("+'1' + ',' + textBox1.Text + ',' + textBox2.Text + ','+ textBox3.Text + ','+ textBox4.Text+ ',' + textBox5.Text + ',' + textBox6.Text +',' +textBox7.Text + ',' + textBox8.Text+ ',' + textBox9.Text + ')',conn);
  6. cmd.ExecuteNonQuery();
  7. conn.Close();
  8. }
  9. catch (OleDbException ex)
  10. {
  11. MessageBox.Show(ex.ToString());
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement