Here is the code (with server/passwords etc removed)
public int SetUploadedInESIDatabase(string ID)
{
using (var oOracleConn = new OracleConnection())
{
oOracleConn.ConnectionString =
@"Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=<ip>)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=<dbname>)));User Id=<user>;Password=<password>;";
var cmd =
new OracleCommand(
"UPDATE FOO_ACCESS SET PIMAGE ='-1' WHERE CODE= '" + ID + "'", oOracleConn);
oOracleConn.Open();
return cmd.ExecuteNonQuery();
}
}
The effect of this code is it never gets past the return statement. No error is returned (even overnight)
I am not a database expert but our hard pressed DBA says that the connection was being locked (or the row possibly...) he killed the locking connection but still when I run the code it locks up.
Am I doing it wrong(tm) with regards to asking Oracle to update a row?
I realise I should be using a parametrised query but I had an issue with that and needed simple things! If I copy the built command out of the cmd. with the debugger and run it using SQL Developer then it works (though sometimes it locks up too)
I can select from the database at will.
I am not sure if this is a normal thing or something to do with our environment, so any help is gladly accepted!