blob setBinaryStream

Поиск
Список
Период
Сортировка
Искать
От
Matt Fair
Тема
blob setBinaryStream
Дата
Msg-id
3BAF4759.5030402@netasol.com
Список
Дерево обсуждения
Re: blob setBinaryStream Matt Fair <matt@netasol.com>
Do you need to create a transaction to set blobs?
        con.setAutoCommit(false);
        FileInputStream fis = new FileInputStream(file);
        PreparedStatement ps = con.prepareStatement("update= 
userpreferences set image='?' and time=? where user='?'");
        Logger.log("Setting Binary Stream");
        ps.setBinaryStream(1, fis, length);
        ps.setInt(2, (int)new java.util.Date().getTime());
        ps.setString(3, user);
        ps.executeUpdate();
        ps.close();
        fis.close();
        con.commit();
        con.setAutoCommit(true) ;

When Set Binarystream calls the setInt method, it throws a 
 SQLExceptionParameter index out of range.
Does anyone know what this could be?


В списке pgsql-jdbc по дате отправления
От: Bruce Momjian
Дата:
Сообщение: Re: JDBC test suite patch
От: Matt Fair
Дата:
Сообщение: Re: blob setBinaryStream
FAQ