I've a problem to update my database.
public void UpdateAto(AtoEntity atoEntity)
{
OracleDataAdapter da = new OracleDataAdapter();
string oradb = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=blabla.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=test13)));;User Id=id13;Password=pwd13;";
OracleConnection con = new OracleConnection(oradb);
con.Open();
OracleCommand cmd = new OracleCommand();
cmd.Connection = con;
cmd.CommandText =
"UPDATE SLAPTEOP SET XOCL ='" + atoEntity.OidOcl +
"',NOM='" + atoEntity.NameAto +
"',ETAT='-1" +
"',NBPAAN='11" +
"',DESCRIPTION='" + atoEntity.DescriptionAto +
"',APPORTEUR='" + atoEntity.ContributorAto +
"',AUTEUR_MISEAJOUR='" + atoEntity.AuthorUpdateAto +
"',DATE_MISEAJOUR=SYSDATE WHERE OID ='" + atoEntity.OidAto + "'";
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
con.Dispose();
}
The request is good, it was written without parameters to make it simpler. It has been tested on the SGBD. Select and Insert Request works too.
When I execute cmd.ExecuteNonQuery()
nothing happens in database. It turns in loop.
A try / catch block had been added but no errors or exceptions were caught.