webMethods

webMethods

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.

 View Only
Expand all | Collapse all

BLOB insert and retrieve from Database using JDBC

  • 1.  BLOB insert and retrieve from Database using JDBC

    Posted Tue April 26, 2016 05:10 AM

    Hi All,

    I have the below requirement of inserting and retrieving blob data in database.

    Sours system converts an image into base64Encode and send as a string to wM.

    We converted the string to base64Decode and inserted as blob(byte.array) in DB column.

    But, I am not able to convert that blob to string when I try to retrieve the blob from DB and convert that bytes to String.

    Also,There is an another table which has a blob data already in it and I am able to Encode them as a String.

    I guess their is a problem in the way I insert that blob data.

    Please suggest on how this needs to be done.

    Thanks,
    Sathya


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


  • 2.  RE: BLOB insert and retrieve from Database using JDBC

    Posted Tue April 26, 2016 10:16 AM

    Hi Sathya,

    if possible can you store the encoded String as a CLOB in the database?

    Please share the following informations:
    wM Version
    JDBC Adapter Version
    Database type and version
    JDBC Driver version

    If possible, a sreenshot of the adapter services and the flow snippets might be helpful for us.

    Regards,
    Holger


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


  • 3.  RE: BLOB insert and retrieve from Database using JDBC

    Posted Tue April 26, 2016 10:26 AM

    Hi Holger,

    The Datatype is already defined at end system DB as Blob so we cannot change it.Moreover, I am able to fetch the blob values inserted from other systems in to the DB and encode them .But,I am not able able to fetch the values inserted via wM.

    Going through the forums,I believe writing blob through wM JDBC has some issues and most of them use a custom java code for this.

    Below are the details:

    wM version:9.0.1.0
    JDBC version: I guess 6.5
    data base is oracle
    and driver is ojdbc6.jar

    It will be helpful if you share any custom java code to call a jdbc service in java.

    Thanks,
    Sathya



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