OracleCommand.Clone - Several properties stay default
Posted: Mon 23 Sep 2013 06:56
Hi,
Several properties on OracleCommand are not taken when cloning an OracleCommand. While CommandText and CommandType seem well, PassParametersByName as well as CommandTimeout remain on their default values
Tests were run against Devart 7.8.287;
Several properties on OracleCommand are not taken when cloning an OracleCommand. While CommandText and CommandType seem well, PassParametersByName as well as CommandTimeout remain on their default values
Code: Select all
OracleCommand templateCommand = new OracleCommand();
templateCommand.CommandText = "ASD";
templateCommand.CommandType = CommandType.StoredProcedure;
templateCommand.CommandTimeout = 50;
templateCommand.PassParametersByName = true;
OracleCommand clonedCommand = (OracleCommand)templateCommand.Clone();
Assert.AreEqual(templateCommand.CommandText, clonedCommand.CommandText);
Assert.AreEqual(templateCommand.CommandType, clonedCommand.CommandType);
Assert.AreEqual(templateCommand.PassParametersByName, clonedCommand.PassParametersByName);
Assert.AreEqual(templateCommand.CommandTimeout, clonedCommand.CommandTimeout);