mfetting
Posts: 8
|
Posted: 12/31/2005, 9:02 AM |
|
This is my first attempt at solving this problem. This is what I have done that appears to be working.
xxxDataObject.java I made the following change in //loadDataBind:
//commented out the variable that needed to be converted.
//row.setNote(Utils.convertToString(ds.parse(record.get("Note"), row.getNoteField())));
//added the following code.
Clob cl = (Clob) record.get("Note");
if (cl == null) {
row.setNote("");
} else {
StringBuffer strOut = new StringBuffer();
String aux;
try {
BufferedReader br = new BufferedReader(cl.getCharacterStream());
while ((aux=br.readLine())!=null)
strOut.append(aux);
row.setNote(strOut.toString());
} catch (java.sql.SQLException e1) {
row.setNote(e1.toString());
} catch (java.io.IOException e2) {
row.setNote(e2.toString());
}
}
This is work in progress. I would recommend you save this code block in a seperate file for save keeping.
|
|
|
mfetting
Posts: 8
|
Posted: 12/31/2005, 9:57 AM |
|
The following imports will be needed for this solution.
import java.io.*;
import java.sql.Clob;
|
|
|
Jacob Svendsen
|
Posted: 02/09/2006, 6:23 AM |
|
Thanks for showing the world this solution! It really helped me in my work with Clobs/ClobDomain
|
|
|
TIMON
|
Posted: 02/10/2006, 8:56 AM |
|
error capture no Clob cl = (Clob) record.get("Note");
yes capture Clob cl = record.getClob("Note");
|
|
|
t_coy01
|
Posted: 04/04/2006, 6:44 PM |
|
I have problem with this?
" row.setNote(""); "
Please help....
tnx in advance
|
|
|
mfetting
Posts: 8
|
Posted: 04/04/2006, 7:23 PM |
|
setNote is a setter for note.
In my case the item was note, you may be retrieving something other than note.
I'm unable to tell you what you need to do with the limited description of the problem your experiencing. I hope this helped in some small way.
|
|
|
Deepak
|
Posted: 05/24/2006, 10:28 PM |
|
I am getting problem while writting a proc to convert Clob to Xml,
and Clob to String
ORA-06512: at "SYS.DBMS_XMLGEN", line 83
|
|
|
mfetting
Posts: 8
|
Posted: 05/25/2006, 6:51 AM |
|
Try the following goole search
SYS.DBMS_XMLGEN "line 83"
|
|
|