Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OleDbConnection conn = new OleDbConnection(constring);
- try
- {
- conn.Open();
- 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);
- cmd.ExecuteNonQuery();
- conn.Close();
- }
- catch (OleDbException ex)
- {
- MessageBox.Show(ex.ToString());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement