现在我们使用下面的代码将数据写入.csv文件(即创建)
但现在我必须直接将这些数据更新到一个数据库列CLOB。
而不会生成任何.csv文件。
我如何将这些数据添加到CLOB。
这里我们将每一行都作为vectorIT()传递给writeIT(),并将它添加到filewriter中。
我应该怎么做才能在CLOB中编写它?
请帮我解决..
writeIt(mlh);
writeIt(row);
writeIt(null);
writeIt(commentLineHeader);
writeIt(row);
protected void writeIt (Vector a){
if (filewriter==null) return;
try {
if (a!=null){
for (int i=0;i
//Object o=a.elementAt(i);
Object o=a.elementAt(i);
if (o!=null) {
String str=o.toString();
// replacing an komma inside a string with a point.
str = str.replace(',','.');
// replacing a new line in hexa it's 0A and 0F with blank
str = str.replace('\n',' '); // LF replace
str = str.replace('\r',' '); // CR replace
filewriter.write(str);
}
if (i!=a.size()-1) filewriter.write(",");
}
}
}
catch (IOException e){
errH.addMessage(L_ERROR,"_$EXCEPTION_RAISED -" + e.toString());
PAVSessionManager.getInstance().update_in_use_flag();
}
}