Computer/Program

[informix]Blob Clob Type의 이미지 파일 내려받는 방법

ICARUS㈜ 2012. 9. 10. 20:30
반응형

Informix DB를 이용한 Blob, Clob, Byte 타입의 이미지 또는 txt 파일 업/다운로드 방식


Smart Large Object 함수

 함수명

설 명

버전 

 FILETOBLOB

 - Blob 칼럼으로 파일 복사
구문 : FileToBlob(file_name, file_dest)

예제 : insert into rdb@rserv:db명(cand_pic)

         values(FileToBlob('C:\tmp\photo.jpg','server'));


 9.x 
 FILETOCLOB

 - Clob 칼럼으로 파일 복사
구문 : FileToClob(file_name, file_dest)
예제 : Insert onto std_photo(num, name, photo)
         values(2, '홍길동',FileToClob('smith.jpg', 'client'));


 9.x
 LOCOPY

 - 다른 Blob 또는 Clob 칼럼으로 Blob 또는 Clob 데이타 복사
구문 :  Locopy(column)
예제 : Insert into hakjuk(photo) select LOCOPY(photo) from std_photo where num = '1';

 

 9.x
 LOTOFIle 

 - 파일로 Blob 또는 Clob 복사
구문 : LotoFile(column, file_name, file_dest)

         column : Clob, Blob Type 칼럼명

         file_name : 저장할 Path/file_name

         file_dest : 저장할 시스템 - "client". "server"

예제 : select yyser, LOTOFILE(image, "저장될파일명.jpg", "client") from mm_image where yyser="";


 9.x