I am trying to store a word document in Oracle database. I am using Oracle9i. But, I get the error as:
java.lang.ClassCastException I tried creating a querystring, qstring like String qString = "select resume from Resumes where emp_id = 9004 for update"; oracle.jdbc.driver.OracleResultSet ors = (OracleResultSet)stat.executeQuery(qString); res.next(); BLOB blob = ors.getBLOB("resume");
But, it was of no help. I've included the code below. I've marked the place where the error is shown. Please help. Thanks in advance.
[ March 14, 2005: Message edited by: seema prakash ]
Thanks for guiding me. Yes, I do have the driver installed When I installed oracle9i database, Personal Edition.I do have the jdbc/lib directory which has all the different jars. I ahve included the classes12.jar and the ojdbc14.jar in my classpath too.
Thanks for the help. I got it working. I had problem with the driver connection. Now it works with the following lines: DriverManager.registerDriver((Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance()); conn = DriverManager.getConnection("jdbc racle:thin:@DCXHEILER:1521 rcl","SYSTEM","password");//making the connection.
What's that smell? Hey, sniff this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth