由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - How to insert image to DB2 ?
相关主题
Justhelp! 怎么insert一个多行的string
Oracle / DB2 问题How to insert a string into table? Thanks
Anybody use postgreSQL?JDBC<======================>Oracle8i
How to send BLOB images to remote database?Does MS SQL 7 support SQL3 Datatype?
Re: how to improve the performance of Oracle Insert operation?anyone can check my ASP code about pulldown menu?
How to insert CURRENT TIMESTAMP into sql问个关于sql query 运行速度的问题
about mixed case stringSQL脚本?
question: copy first N rows from table B to table A (DB2)primary key?
相关话题的讨论汇总
话题: db2话题: insert话题: image话题: string话题: file
进入Database版参与讨论
1 (共1页)
s******i
发帖数: 1
1
dear all :
How to insert image in a table of DB2 ?
please tall me,thank you !!
q***e
发帖数: 21
2

The best way for you is to go to
http://www.redbooks.ibm.com
and search all db2 materials(input db2 to search), choose
associate platform and tools you use.
If you use java, you can also go to
http://java.sun.com/docs/books/tutorial/jdbc/jdbc2dot0/index
.html
and read "Using SQL3 Datatypes" for more detail.

【在 s******i 的大作中提到】
: dear all :
: How to insert image in a table of DB2 ?
: please tall me,thank you !!

f*******h
发帖数: 1269
3
An example in Java:
Suppose you have a table (id varchar, image blob)
public static void loadImage(Connection con, String fileName, String
tableName, String idValue){
File imageFile;
try{
imageFile = new File(fileName);
} catch (Exception e) {
System.out.println("File not found!");
return;
}
String queryString = "INSERT INTO "+tableName+" VALUES(?,?)";

try{
PreparedStatement pstmt =
1 (共1页)
进入Database版参与讨论
相关主题
primary key?Re: how to improve the performance of Oracle Insert operation?
a simple question about T-SQLHow to insert CURRENT TIMESTAMP into sql
Problem when using SQL " Insert...." to AutoNumber.about mixed case string
another question--怎么delete a row from a tablequestion: copy first N rows from table B to table A (DB2)
Justhelp! 怎么insert一个多行的string
Oracle / DB2 问题How to insert a string into table? Thanks
Anybody use postgreSQL?JDBC<======================>Oracle8i
How to send BLOB images to remote database?Does MS SQL 7 support SQL3 Datatype?
相关话题的讨论汇总
话题: db2话题: insert话题: image话题: string话题: file