ahmed elgrouney

Greenhorn
+ Follow
since Jul 24, 2016
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ahmed elgrouney

Hi ....

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintStream;
import java.sql.Blob;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;



public class JDBCEx {

public static void main(String args[]) throws SQLException, FileNotFoundException, IOException{  
   



   try (Connection con = DriverManager.getConnection(  
           "jdbc:oracle:thin:@10.0.10.47:1521/intgtest","alexandria","alexandria")) {
       Statement stmt=con.createStatement();
     
       ResultSet rs=stmt.executeQuery("select CONTENTS from TRACK_MESSAGE_CONTENTS");
     while(rs.next())
       {
           

Blob blob;
           blob = rs.getBlob("CONTENTS");
byte[] bdata = blob.getBytes(1, (int) blob.length());
String text = new String(bdata);
           

           System.out.println(text);
       }
        con.close();


...... when i run this code, this error message appear "Invalid column type: getBLOB not implemented for class oracle.jdbc.driver.T4CNamedTypeAccessor"
anyone help me please ... thanks