IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Oracle adapter issues with NCHAR

  • 1.  Oracle adapter issues with NCHAR

    Posted Thu June 25, 2015 06:54 AM

    Hello,
    we are trying to use a jdbc connection for Oracle DBMS.
    The problem is that when we try to do a “Select” statement using a data type “nChar” into the where column we must pad the input vale before passing it into the input value of the adapter. This happens mainly because the nchars in oracle have a fixed length.
    I would like to know if there is a way to bypass this behavior so that i can retrieve, for example, record like this:
    supposing that name is an nchar( 8 ) column

    select surname from people where name='joe'

    instead of be obliged to do

    select surname from people where name='joe     '

    (or padRight the name value till 8 chars before using it)
    This is my environment:
    webMethods 9.7
    Adapter 9.0
    ojdbc7

    Can someone help me?
    thanks!


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 2.  RE: Oracle adapter issues with NCHAR

    Posted Thu June 25, 2015 07:31 AM

    Before passing the input name to your select adatper service, you have to transform (use WmPublic/pub.string:padRight) the name to have spaces after your name.

    Pass the transformed name to your adapter service and see if that works.


    #webMethods
    #Adapters-and-E-Standards
    #Integration-Server-and-ESB


  • 3.  RE: Oracle adapter issues with NCHAR

    Posted Thu June 25, 2015 07:44 AM

    Thanks for your answer. Of course if I pad the value it works but as I’ve said I do’n’t want to. If I were going to use padRight I will have to use it in too many pieces of my code. So my question is if there’s a property to set into the connection or if I have to use a different driver or something like that.

    Thanks again!


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Oracle adapter issues with NCHAR

    Posted Thu June 25, 2015 08:25 AM

    I understand your point that the current solution is not feasible and a best approach. Let me do some analysis to check if JDBC adapter supports this or we can also do this via FF for padding spaces at right.

    Share me if you find any other solution. Thanks


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 5.  RE: Oracle adapter issues with NCHAR

    Posted Thu June 25, 2015 09:25 AM

    thanks again! In the meantime i’ve tried to move from ojdbc7 to ojdbc6 and it doesn’t seem to change anything…


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: Oracle adapter issues with NCHAR

    Posted Thu June 25, 2015 01:07 PM

    Some news ? :frowning:

    P.S.
    what do you meant with "do this via FF " ?


    #webMethods
    #Adapters-and-E-Standards
    #Integration-Server-and-ESB


  • 7.  RE: Oracle adapter issues with NCHAR

    Posted Tue June 30, 2015 03:43 AM

    It was just a guess if this can be done via flat file. But I need to try.

    Did you find anything?


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: Oracle adapter issues with NCHAR

    Posted Tue June 30, 2015 08:35 AM

    Silvio,
    For your need, write your custom code.

    Thanks,


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 9.  RE: Oracle adapter issues with NCHAR

    Posted Tue June 30, 2015 02:44 PM

    One option (assuming you must stick with nchar): select surname from people where rtrim(name)=‘joe’

    Percio


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods