This content has been marked as final. Show 2 replies
Don't know, that looks fine to me.
Out of curiousity, have you tried using a stored procedure instead? I've got code doing that and I know it works.
I'm not sure if this is intentional or not or perhaps just a result of testing, etc...
You are using the following OracleParameter constructor:
In this case obj is the value for this OracleParameter.
public OracleParameter(string parameterName, OracleDbType type, object obj, ParameterDirection direction);
However, in your code I see the following:
So, for the "newName" parameter you are using the "originalName" array as the source and for the "name" parameter
command.Parameters.Add(":newName", OracleDbType.Varchar2, originalName, System.Data.ParameterDirection.Input); command.Parameters.Add(":name", OracleDbType.Varchar2, newName, System.Data.ParameterDirection.Input);
you are using the "newName" array as the source.
This will result in SQL such as the following:
I think you want the following:
update TEST set NAME=<originalName value> where NAME=<newName value>
Though, perhaps you have it this way to "undo" a previous execution of the update statement?
update TEST set NAME=<newName value> where NAME=<originalName value>