Search Postgresql Archives

Read a CLOB data from an Oracle table and INSERT it into a BYTEA column in Postgres using jdbc?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Im reading from an Oracle table and inserting the values to a postgres table thro' jdbc. Everything works fine except for the BLOB data in Oracle.
  
My code snippet ...

  while (rs1.next())
        {          
          for (int m=1;m<=colCount;m++)
            {    
              pstmt.setObject(m, rs1.getObject(m));
            }
           pstmt.executeUpdate();
           connection2.commit();
           System.out.println("DONE");
        }


This inserts the data into teh postgres table but gives this error for a BLOB datatype....
 Exception in thread "main" org.postgresql.util.PSQLException: ERROR: column "columnXXX" is of type bytea but expression is of type bigint

Any thoughts?

Thanks
Sharmila
  


      

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux