StringParamsMustMatchCharColumns
- Last Updated: May 15, 2020
- 1 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
Purpose
Determines whether the driver uses ORA_CHAR or ORA_VARCHAR bindings for string parameters in a Where clause. Using ORA_VARCHAR bindings can improve performance, but may cause matching problems for CHAR columns.
Valid Values
true | false
Behavior
If set to true, the driver uses ORA_CHAR bindings.
If set to false, the driver uses ORA_VARCHAR bindings, which can improve
performance. Use this value if your application does not match string parameters against
CHAR columns. For example, in the following code, if col1 is defined as a CHAR(10) and the
column name has the string 'abc' in it, the match will fail.
ps = con.prepareStatement("SELECT * FROM employees WHERE col1=?");
ps.setString(1, "abc");
rs = ps.executeQuery();
Default
true
Data Type
boolean