The most driver I know, just support setObject for a given
set of classes (typically some or all Subclasses of Number, String,
Date)
or column types (typicaly no blobs)

To use a portable solution I would serialize the Object to an byte array
and store it with PreparedStatement.setBytes()

As storing blobs is a quite a pain if you deal with different databases.
(At least it was, 1 year ago) I prefer to store blobs outside of the 
database. (To do this, you have to make shure that you don't delete or 
overwrite the file before the transaction is committed)

> -----Urspr�ngliche Nachricht-----
> Von: Paul Kofon [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 12. Juni 2002 19:39
> An: [EMAIL PROTECTED]
> Betreff: Storing Java Objects in SQL
> 
> 
> I'm trying to store objects (instances) of a class in Microsoft SQL
Server 
> 2K using the Microsoft-provided JDBC driver, but I've been without any
luck 
> thus far.
> I've used the setObject() method in the PreparedStatement class and
set my 
> target sql type to "BINARY", yet it doesn't work, I keep getting an 
> SQLException. 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to