learn java
The moose likes Servlets and the fly likes What is the error?thanks! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "What is the error?thanks!" Watch "What is the error?thanks!" New topic

What is the error?thanks!


Joined: Aug 14, 2001
Posts: 2
public String WriteClob(String text)throws Exception{
Class.forName ("oracle.jdbc.driver.OracleDriver");
Connection sqlcon=DriverManager.getConnection("jdbc racle ci8:@abcd","system","manager");
Statement sqlstmt=sqlcon.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
String strsql="select content from mytable where id=1000 for update";
ResultSet rs=sqlstmt.executeQuery(strsql);
oracle.sql.CLOB clob=((oracle.jdbc.driver.OracleResultSet)rs).getCLOB("content");
Writer writer=clob.getCharacterOutputStream();
return "Success!";
first,it is sure that there is the record which id=1000.
The CLOB length is displayed when i add the statement "System.io.print(clob.length());" after the statement "clob=((oracle.jdbc.driver.OracleResultSet)rs).getCLOB("content");"
Who do help me ?
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1862

The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
wood burning stoves
subject: What is the error?thanks!