![]() |
|
![]() ![]() ![]() |
Writing BLOB data
In order to write BLOB data (such as a file) to a database field, the database field needs to be of a Blob type (or Image type in case of SQL Server). You will need to write a Java code for setting either a File or InputStream object to a Dialog Designer variable that binds to the db operation field.
Example
IVariable variable = mySession.getVariable("InsertTestBlob");
IVariableField field = variable.getComplexVariable().getField("MyImage");
String projectPath = mySession.getAbsoluteProjectFilePath();
File file = new File(projectPath + "/test.wav");
try {
field.setValue(new FileInputStream(file));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
![]() ![]() ![]() |
©2009, Avaya Inc. All rights reserved.
|