Usage of Oracle binding variables with LIKE in C#
问题 As part of an effort to stop using dynamic SQL generation and encourage use of bind variables, I am running into some problems. I am querying an Oracle 9i database from an ASP.NET page using Oracle Data Providers for .NET The query is sql = "SELECT somedata FROM sometable WHERE machine = :machineName "; I define the Oracle Parameter as follows OracleParameter parameter = new OracleParameter(); parameter.ParameterName = "machineName"; parameter.OracleDbType = OracleDbType.Varchar2; parameter