Hi
I am reading in SQL Adapter service BINARY data from database and need to convert to String. How do I get it from the Pipeline? In my SQL Adapter the database value is defined as follwo:
Outpu JDBC Type : Binary
Output Field Type : byte array
and I ttried in JAVA service followings:
option1
Byte bytesData = (Byte) IDataUtil.getObjectArray(mycursor, “MyBinaryData”)
option2
String mySTring= IDataUtil.getString(aResult, “MyBinaryData”);
But no of them return correct data
?
Regarding option1 which I think is the right way, is trying to get it as objectArray the right way?
I tried following but does not work:
byte b2 = new byte[bytesData.length];
String mydataString = new String(b2);
System.out.println(mydataString );
Thanks for any help