skip to main content
Connection property descriptions : StringParamsMustMatchCharColumns
  

Try DataDirect Drivers Now

StringParamsMustMatchCharColumns

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();

Data source method

setStringParamsMustMatchCharColumns

Default

true

Data type

boolean

See also

Performance considerations