I think, you can convert the object to a byte array, which would be the
datatype for the BLOB.

Madhesh


> -----Original Message-----
> From: Matthias Carlsson [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, September 26, 2000 10:47 AM
> To:   [EMAIL PROTECTED]
> Subject:      Storing a serialized object in a database
>
> I'm creating a rather big web application using servlets and JSPs, and
> I've
> decided
> that the best way to store user information must be to put everything in a
> class and
> then serialize it. So far so good, but how do I store a serialized object
> in
> a SQL-
> database (in a specific field)? I understand that the field type must be a
> blob (?).
> I believe I'm pretty sure about how to *get* the data, it's just the
> storing
> part
> that is bothering me.
>
> I've read Sun's JDBC tutorial and searched the JavaWorld Topic archives,
> but
> haven't
> found anything on this subject. Any help will be appreciated.
>
> Thanks,
>
> [ Matthias Carlsson ]
> [ Programmer (Java, CGI/Perl, Javascript, HTML) ] [ Web Designer ]
> [ E-Mail : [EMAIL PROTECTED] ] [ ICQ: 1430647 ]
> [ http://home1.swipnet.se/~w-18931/programming/ ]
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to