Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Export image file to binary field

Hi and thank you for this real great tool.

I have to migrate some contents from MySQL to Ms SQL data base
Into my MySQL data base i have only paths of some pictures, i would like to stock the binary of pictures into my MS SQL database.
I know that it is possible with TftpfileList or TfileList but have no idea how to convert content and how should i order and arrange those components to do it.
If some one can share his experience or help me to do that.
(PS : I'm using Talend Open Studio)
Thanks !!!
Labels (2)
4 Replies
janhess
Creator II
Creator II

Yes I've done this - I'll post the details on Monday as I'm just on my way home.
janhess
Creator II
Creator II

This is what I did to populate a ms SQLserver database.
It requires a routine ImageUtil
// template routine Java
package routines;
import java.io.FileInputStream;
import java.io.File;
import java.io.FileNotFoundException;
public class ImageUtil {
public static byte[] getByte(String filepath) {
byte[] b=null;

try {
FileInputStream fis = new FileInputStream(filepath);
b=new byte;
fis.read(b);
} catch (Exception e) {
e.printStackTrace();
}
return b;
}
}
This is used to create the image as a byte array in tMap4 for input to the database column which has a datatype of image.
Anonymous
Not applicable
Author

Thank you very much !!
I will try that.
Anonymous
Not applicable
Author

Hi,my team is also  trying to do this.It will be great if you can elaborate the process.