Hi,
On further consideration of what you are asking, I think it depends
entirely on the capabilities of your db driver and how it accesses db blob
fields.  I can't find any official way to create an object implementing
java.sql.Blob oneself, just to get it from a result set and set a parameter
to it. So, I can't see how you can use java.sql.Blob implementations to
insert a new picture. (this is what I was asking about)

 However, your db may support other ways of accessing the data in a db
column of sql type blob (whatever it thinsk that means).  For instance the
jca/jdbc driver for Firebird I am working on supports setting blob columns
from byte[] via setBytes and from streams by setBinaryStream.  This doesn't
appear to be strictly in conformance to the spec, however I can't see any
other way to insert data into a blob column.

As I said, if anyone knows a spec compliant way I would like to know it.

thanks

david jencks


On 2001.07.14 06:04:25 -0400 Jason Dillon wrote:
> It looks like JAWS can persist objects via BLOB... but that is just a
> simple
> guess by looking at the standardjaws.xml, it has some lines that look
> like
> this:
> 
>   <mapping>
>     <java-type>java.lang.Object</java-type>
>     <jdbc-type>JAVA_OBJECT</jdbc-type>
>     <sql-type>BLOB(2000)</sql-type>
>   </mapping>
> 
> Which would lead me to believe that you could get JAWS to persist to a
> record
> with a BLOB column.  I would try it.
> 
> --jason
> 
> 
> On Fri, 13 Jul 2001,
> Ivan Novick wrote:
> 
> > So to create an Entity Bean for that stores a blob, would you have to
> use
> > BMP?
> >
> > Ivan
> > ----- Original Message -----
> > From: "david" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, July 13, 2001 12:20 PM
> > Subject: Re: [JBoss-user] BLOB
> >
> >
> > > Hi,
> > > Well, I wonder if it can work, I could find no way in the jdbc spec
> to
> > > create a new blob!  So maybe you could read the picture but I don't
> know
> > >
> > > how JAWS could insert a new row.  I hope I'm wrong, please tell me
> how.
> > >
> > > Thanks
> > > David Jencks
> > >
> > > On 2001.07.12 04:31:21 -0400 Burkhard Vogel wrote:
> > > > Hi,
> > > > If your DB driver supports blobs, why not (oracle has problems,
> AFAIK)
> > >
> > > > Burkhard
> > > > ----- Original Message -----
> > > > From: "Ivan Novick" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Thursday, July 12, 2001 9:16 AM
> > > > Subject: [JBoss-user] BLOB
> > > >
> > > >
> > > > > Can an entity bean contain a BLOB type attribute that represents
> a
> > > > picture
> > > > > in a database?
> > > > >
> > > > > Ivan
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > JBoss-user mailing list
> > > > > [EMAIL PROTECTED]
> > > > > http://lists.sourceforge.net/lists/listinfo/jboss-user
> > > >
> > > >
> > > > _______________________________________________
> > > > JBoss-user mailing list
> > > > [EMAIL PROTECTED]
> > > > http://lists.sourceforge.net/lists/listinfo/jboss-user
> > > >
> > >
> > >
> > >
> > > _______________________________________________
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to