3 messages in com.mysql.lists.javaPreparedStatement setBinaryStream pro...
FromSent OnAttachments
David Noel07 Jan 2000 11:00 
Yong Zhou11 Jan 2000 05:10 
Mark Matthews11 Jan 2000 05:59 
Subject:PreparedStatement setBinaryStream problem with BLOB data
From:David Noel (davi@hotmail.com)
Date:01/07/2000 11:00:05 AM
List:com.mysql.lists.java

Hi,

I am using mm.mysql.jdbc-2.0pre3 to access MySQL and I am having some problems. I am using a prepared statement to perform a SQL update command on a table that has a LONGBLOB field. The main purpose of the update is to insert an InputStream of binary data into the blob field. After I set all the fields in the update statement (including the setBinaryStream for the blob) I execute the prepared statement with an executeUpdate call. This method throws the following.

java.sql.SQLException: No value specified for parameter 2 at org.gjt.mm.mysql.PreparedStatement.executeUpdate(PreparedStatement.java:300) at CreateData.main(CreateData.java:112)

parameter 2 is the blob data.

This used to work when I was using mm.mysql.jdbc-2.0pre.

Does anyone know if this is a known bug with the beta driver?

Any ideas would be helpful.

Thanks

Dave