1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
private void button1_Click(object sender, EventArgs e)
{
OracleConnection OraCon = new OracleConnection();
string connexionstring = "data source=rs;user=sys;password=psw;";
OraCon.ConnectionString = connexionstring;
OraCon.Open();
OracleTransaction myOracleTransaction = OraCon.BeginTransaction();
String requete = "INSERT INTO inscription (nom, prenom, activité, fonction, société, département, service, site_web, tel, fax, mail, adr, codePos, autre_tel, ville, pays, connaissance_logivar, besoins) VALUES ('" + txtnom.Text + "','" + txtprn.Text + "','" + activité.Text + "','" + fct.Text + "','" + txtsocieté.Text + "','" + txtdep.Text + "','" + txtservice.Text + "','" + txtweb.Text + "','" + txttel.Text + "','" + txtfax.Text + "','" + txtmail.Text + "','" + txtadr.Text + "','" + txtcodpostal.Text + "','" + txtautrtel.Text + "','" + txtville.Text + "','" + txtpays.Text + "','" + comboconnaiLogivar.Text + "','" + richTxtbesoin.Text + "')";
OracleCommand myOracleCommand = new OracleCommand(requete, OraCon, myOracleTransaction);
myOracleCommand.ExecuteNonQuery();
myOracleTransaction.Commit();
OraCon.Close();
} |
Partager