[SQL] Some queries
Dear sir, Q 1) While retrieving BLOBs from the database... There is an Exception displaying : with message... Fast path protocol error : z Eventhough i am importing like : import postgresql.fastpath.*; import postgresql.largeobject.*; and connecting : Fastpath fp; LargeObjectManager lobj; lobj = ((postgresql.Connection)conn).getLargeObjectAPI();// ...code that opens a connection ... fp = ((postgresql.Connection)conn).getFastpathAPI(); //Fastpath object allowing access to functions on the postgresql backend. by osing lobj i want to get Image directy into HTML by lobj.open(OID). Q 2) Is it posiible to get LargeObjects from database and display in HTML. Ex: I want to display image file dynamically by retrieving database , without using streams . i.e without creating file and storing it to disk. Could you answer these queries ...and reply back ASAP.. If there are any such methods pls. send me the code too.. Rgds Som
[SQL] Insertion and Retrieval of BLOB
Hi Everybody, There are two methods we can insert and retrieve image from db. One is by JDBC way , another is by Postgres extensions. I have problem with both while implementing. If im trying to retrieve the image (which is stored in OID type) by Postgres extensions, Ex: using LargeObjectManager lobj; LargeObject lobj.open(OID); Exception :Fast path protocol error: Z If im trying insert image by JDBC way i.e by getBinaryStream()a and setBinaryStreams() methods of PreparedStatement Im getting Exception saying : Exception : InputStream parameter is not supported. any idea ? -- Som --
[SQL] FastPath Protocol Error
Helooo.. I have problem while retrieving image from postgres 7.0.0 through some front-end. I am getting Exception saying: FastPath protocol error : Z any idea? -- som
[SQL] Image insertion by using BLOB
Hi ALL,
I am trying to insert the image from the client to database by
spicifying the Windows NT machine filepath.
The server(postgresql 7.0) is situated at the linux.
If filepath is linux m/c's then i can ...
If filepath is winNT then i have Exception saying :
ERROR: lo_import : ca't open unix file "/jigsaw/jigsaw/www/som.gif "
No such file or directory
Query is as follows::
insert into tablename values('som', lo_import('PATH'));
If possible , how ?
-som
[SQL] FastPath protocol SQLException
Dear All,
i am trying to insert image in postgres 7.0 by using following code:
i am getting FastPath protocol error : Z
Could any one reply earliest...?
Any feasible solution ?
PreparedStatement stmnt =conn.prepareStatement("insert into
grms_photogallary (user_id,oid) values (?,?)");
// Set parameters
String userId="soms";
stmnt.setString(1, userId);
File file = new File("/jigsaw/jigsaw/www/easilogo.gif");
InputStream photoIn=new FileInputStream(file);
int size=photoIn.available();
String str="";
for(int i=0;i
