Hello, I'm new in this list so I don't know if this question has been
asked before. If so, sorry.
The question is that I'm trying to insert text and/or binaries in an OID
column but I can't find the way to do it. I have tried to use the code
in the documentation (section "Using large objects") but I get this
message: "InputStream as parameter not supported".
Can someone please post some code here so I can see how it's done? Where
can I get the latest compiled JDBC driver?
Thank you very much,
Esteban Chiner
P.D: If it helps, this is the code I use:
try {
String texto = "Whatever";
pst = con.prepareStatement("INSERT INTO users VALUES (?,?)");
pst.setString(1,"user_name");
byte[] bytes = texto.getBytes();
InputStream is = new ByteArrayInputStream(bytes);
pst.setBinaryStream(2,is,texto.length());
pst.executeUpdate();
} catch (SQLException E) {
}
-------------------------------------------------------
Esteban Chiner Sanz
PlazaSite S.A. c/ Tomás Bretón 32-38
08950 Esplugues de Llobregat (Barcelona), SPAIN
Ph: 667570713 Fax: +34 93 3711968
Email: [EMAIL PROTECTED]
-------------------------------------------------------
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html