From: Hans-Jürgen Schönig <hs@cybertec.at>
To: pgsql-docs@postgresql.org
Subject: users-lounge/docs/7.1/programmer/jdbc-lo.html - ERROR?
Date: Tue, 05 Jun 2001 15:09:23 +0200
Message-ID: <3B1CDA02.9CD1E403@cybertec.at> (raw)
I have copied the code out of the source code but somehow the compiler
fails. There seems to be something wrong with the docs.
I am using PostgreSQL 7.1.2 on RedHat 7.1.
conn.setAutoCommit(false);
File file = new File("snapshot.bmp");
FileInputStream fis = new FileInputStream(file);
PreparedStatement ps = conn.prepareStatement("INSERT INTO images VALUES
(?, ?)");
ps.setString(1, file.getName());
ps.setBinaryStream(2, fis, file.length());
ps.executeUpdate();
ps.close();
fis.close();
oconnect.java:20: setBinaryStream(int,java.io.InputStream,int) in
java.sql.PreparedStatement cannot be applied to
(int,java.io.FileInputStream,long)
ps.setBinaryStream(2, fis, file.length());
^
1 error
Hans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: hs@cybertec.at
Subject: Re: users-lounge/docs/7.1/programmer/jdbc-lo.html - ERROR?
In-Reply-To: <3B1CDA02.9CD1E403@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox