Displaying image in Ireports using PostgreSql

前端 未结 3 1474
鱼传尺愫
鱼传尺愫 2020-12-04 02:29

I am trying to load image from PostgreSQL database into jaspersoft ireports(4.0) but I am receiving an error.

In PostgreSQL image is stored as bytea object. In irepo

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-04 02:39

    In PostgreSQL the bytea type is not a BLOB, and you can't use a stream. In SQL standard terms it is a byte string. It should be loaded to a byte array in Java.

    If you want to use BLOB techniques in PostgreSQL you must use the large objects feature.

    http://www.postgresql.org/docs/current/interactive/largeobjects.html

提交回复
热议问题