I am trying to parameterise all our existing sql, but the following code is giving me a problem:
command.CommandText = String.Format("SELECT * FROM({0}) WHERE ROWNUM <= :maxRecords", command.CommandText);
command.Parameters.Add("maxRecords", OracleType.Int32).Value = maxRecords;
The error reported is "ORA-01036: illegal variable name/number".
I assume that this is because OracleType.Int32 is not the correct datatype for ROWNUM. So what is it?