Prepared Statement used in JDBC Query Palette with Oracle Thin JDBC Drivers ignores binding parameter of column TYPE CHAR.
book
Article ID: KB0087684
calendar_today
Updated On:
Products
Versions
TIBCO Designer
-
Not Applicable
-
Description
Resolution: Description: ============ Prepared Statement used in JDBC Query Palette with Oracle Thin JDBC Drivers ignores binding parameter of column TYPE CHAR, and returns no records in resultset. We do not observe the same behavior when we switch the drivers from Oracle JDBC drivers to DataDirect JDBC drivers. Prepared Statement query returns records from Oracle DB.
Cause: ======== Oracle has proprietary way of binding char data in preparedStatements. BW uses generic JDBC API when binding data.This is the reason for this behavior. This is the limitation on Oracle Drivers. Refer to https://forums.oracle.com/forums/thread.jspa?threadID=183252.
Resolution: =========== For this to work in BW with Oracle thin driver, the value needs to be padded with spaces. So to get this working you need to use pad function in BW and your mapping will look like the following: =================== tib:pad($Start/root/param1,<CHAR COLUMN WIDTH>) ===================.
NOTE: <CHAR COLUMN WIDTH> is the string length (in bytes or characters) between 1 and 2000 bytes for the CHAR column width. Check your table details in Oracle DB.
Issue/Introduction
Prepared Statement used in JDBC Query Palette with Oracle Thin JDBC Drivers ignores binding parameter of column TYPE CHAR.