J
JAW
I have the following code......
private ReturnValue ProcessNonQuery (string sql)
{
ReturnValue status = ReturnValue.SUCCESS;
OracleTransaction myTrans = con.BeginTransaction ();
OracleCommand myUpdate = new OracleCommand(sql, con, myTrans);
myUpdate.CommandType = CommandType.Text;
try
{
int numRows = 0;
numRows = myUpdate.ExecuteNonQuery ();
}
catch
{
myTrans.Rollback ();
return ReturnValue.DB_EXECUTENONQUERY;
}
myTrans.Commit();
return status;
}
The connection is already made and the connection object (con) is valid. When I ussue a simple update statement the db
row is nerver updated. If I take this same statement (sql) and paste it into SQL worksheet using the same
username/password and run it, it works just fine. I have a simple connection statement of :
User ID = <user>; Password = <pwd>;Data Source = <dsn>.
The database server is Oracel 9i (9.2.x) and I have the appropiate 9i client on my development workstation.
Any ideas as to why the update is not occuring ?
Thanks !
Jerry
private ReturnValue ProcessNonQuery (string sql)
{
ReturnValue status = ReturnValue.SUCCESS;
OracleTransaction myTrans = con.BeginTransaction ();
OracleCommand myUpdate = new OracleCommand(sql, con, myTrans);
myUpdate.CommandType = CommandType.Text;
try
{
int numRows = 0;
numRows = myUpdate.ExecuteNonQuery ();
}
catch
{
myTrans.Rollback ();
return ReturnValue.DB_EXECUTENONQUERY;
}
myTrans.Commit();
return status;
}
The connection is already made and the connection object (con) is valid. When I ussue a simple update statement the db
row is nerver updated. If I take this same statement (sql) and paste it into SQL worksheet using the same
username/password and run it, it works just fine. I have a simple connection statement of :
User ID = <user>; Password = <pwd>;Data Source = <dsn>.
The database server is Oracel 9i (9.2.x) and I have the appropiate 9i client on my development workstation.
Any ideas as to why the update is not occuring ?
Thanks !
Jerry