Hi,
Here is a sample code
byte[] image_array; // read from file/other source and store the image as an
binary array here
Connection con // Instantiate this
pst = con.prepareStatement("INSERT INTO table_name (image_feildname)
values(?)");
pst.setBinaryStream(1, new ByteArrayInputStream(images_array),
image_array.length);
int ret = pst.executeUpdate()
Check ret for success.
Hope This helps
Madan
----- Original Message -----
From: RAJA <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 23, 2000 10:22 AM
Subject: Query
> Hi all,
> I am working on a servlet project and am doing my
> Testing with MS-Access . I need store images in the database . In my
> data base i have defined the field as OLE (Long Binary).Does any one
> know what is the sql for inserting records in a table if the type is
> ole . i.e if the object is an image how do i give it with in the
> insert command?.
>
>
> Regards,
> Raja
>
>
___________________________________________________________________________
> 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