Retrieving bytes error!!
От | FERNANDA M. |
---|---|
Тема | Retrieving bytes error!! |
Дата | |
Msg-id | 20031023231935.5743.qmail@web13804.mail.yahoo.com обсуждение исходный текст |
Список | pgsql-jdbc |
Hello! i have problem when retrieving a byte array from postgres. I'm saving a file (open office) with the following code... FileInputStream fis = new FileInputStream(doc.getFile()); length = (doc.getFile()).length(); PreparedStatement ps = connection.prepareStatement ("INSERT INTO documents VALUES (?, ?, ?, ?)"); ps.setInt(1, doc.getDocumentId()); ps.setString(2, doc.getFileName()); ps.setDate(3, new java.sql.Date(System.currentTimeMillis())); ps.setBinaryStream(4, fis, (int) length); ps.close(); int insertado=ps.executeUpdate(); ===== .................... F E R D I ............................ Les choses simples sont les plus extraordinaires, et seuls les savants parviennent � les voir...L'Alchimiste ferdim@yahoo.com ferdim79@msn.com http://geocities.com/ferdim __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com
В списке pgsql-jdbc по дате отправления: