java.sql.SQLException : General error

Hi every body,

Once i compile my jdbc program i am getting an General error

I created a table and an attachment to oracle database using jdbc, worked well ,now my question is once i thought to read that attachment in a local disk i am getting this error.

Can any one plz come up with solution

My code as follows

import java.sql.*;

import java.io.*;

public class Sampleread {

public static void main(String args[])throws SQLException

{

try

{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection cn=DriverManager.getConnection("jdbc:odbc:oracledsn","scott","tiger");

Statement st=cn.createStatement();

ResultSet rs=st.executeQuery("Select * from Sample");

rs.next();

//System.out.println("Before");

InputStream is=rs.getBinaryStream("text");

//System.out.println("After" +is);

FileOutputStream fos=new FileOutputStream("c:/ram/xyz.xml");

BufferedOutputStream bos=new BufferedOutputStream(fos);

int a;

while((a=is.read())!=-1)

{

bos.write(a);

}

}

catch(Exception e)

{

System.out.println(e);

}

}

}

regards

thanks in advance

ramkoil

[1261 byte] By [Ramkoila] at [2007-11-26 19:44:00]
# 1
(it's a pain to ask for that each time)can you show us the stack trace please?
alban.maillerea at 2007-7-9 22:27:45 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...