× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks for the reply.

Have any ideas then how to convert or cast a byte[] to a Blob?
I've tried multiple ways but so far no luck and I don't think I want to go 
from byte array to string to Blob.
http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/r0008989.htm

Any ideas would be appreciated.

Thank You
Ron

Here's a snippet of my code:

import COM.ibm.db2.app.*;
import COM.ibm.db2.app.Blob;
import java.sql.*;
import java.math.BigDecimal;
//import org.apache.commons.codec.binary.Hex;
//import org.apache.commons.codec.binary.Base64;
//import org.apache.commons.codec.DecoderException;

  public void history(

    // input parameter(s)

    String              parmWhere,

    // output columns

        String          Transactioncode,
        String          OrderNumber,
        String          ItemNumber,
        String          Warehouse,
        Blob            TokenBlob)      // Have tried String

  throws Exception {

        byte [] TokenUsedToUniquelyIdentifyRecord;

String sql="SELECT " +
          "Transactioncode, " +
          "OrderNumber, " +
          "ItemNumber, " +
          "Warehouse, " +
          "TokenUsedToUniquelyIdentifyRecord, " +
  "FROM Inventory.dbo.Inventory_History " +
  (parmWhere.equals("")?"":"WHERE " + parmWhere); 

// Read the SQL Server "binary" column as a byte array in Java then 
convert or cast it to a DB2 Blob
// Type mismatch: Cannot convert from byte[] to a Blob
TokenBlob = rs.getBytes("TokenUsedToUniquelyIdentifyRecord"); 
 set(58, TokenBlob);


The information contained in this message, and any attachments, are or may 
be privileged and/or confidential and protected from disclosure and may 
also be covered by the Electronic Communications Privacy Act, 18 U.S.C. 
2510-2521. If the recipient of this message is not the intended recipient 
or authorized to receive this information for the addressee, you are 
hereby notified that any dissemination, distribution or copying of this 
communication is strictly prohibited. If you have received this 
communication in error please delete it from your computer immediately.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.