aspose file tools*
The moose likes JDBC 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
Bookmark "Using BLOB in java" Watch "Using BLOB in java" New topic
Author

Using BLOB in java

Raj Khanna
Greenhorn

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

public class Emp implements java.io.Serializable {
public int no;
public String name;
public Emp(int no, String name) {
this.no = no;
this.name = 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
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Don't get me started about those stupid light bulbs.
 
subject: Using BLOB in java