File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Using BLOB in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Using BLOB in java" Watch "Using BLOB in java" New topic

Using BLOB in java

Raj Khanna

Joined: Sep 13, 2007
Posts: 2
I have a class Emp

public class Emp implements {
public int no;
public String name;
public Emp(int no, String name) { = no; = name;

and i have a created a table

create table tableEmployee(empid smallint, empdata BLOB(4096))

How can add record into the blob column and also how to read data from the blob

column using java.

Would be grateful if some one can give a sample code.

Thanks in advance.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63858

"cdude dudec", please check your private messages for an important message from me.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Using BLOB in java
It's not a secret anymore!