资讯   |   开发   |   选机中心   |   产品大全 | IBM | 惠普 | 联想 | 戴尔 | 苹果 | 神舟
更多: | 华硕 | 明基 | 方正 | 紫光 | TCL | 夏新 | 联宝 | 宏碁 | 七喜 | 长城 | 清华同方 | 海尔 | 三星 | 东芝 | 索尼 | 富士通 | LG | 技术 | ddnoon
当前位置:笔记本 > 软件开发 >
Advertisement
文章正文

如何操作image类型的数据

类型:转载   责任编辑:asp.net   日期:2007/05/23


热门软件下载:


   

我打算把图像存储为数据库的image类型,  
   
  但是,不知道该怎么操作,包括输入、输出,  
   
  再有,能否对其进行搜索和比较操作。  
   
  多谢!

网友回答:

发表者:victor_yang

用ado的话,就是     vStream:=adoquery.CreateBlobStream(Field,mode),至于stream的类型要看你的需要了。

发表者:tomhuang

updatetext\inserttext.

发表者:debye

下面这个函数把图片存入blob中,  
  然后用updateblob更新到数据库中  
   
  string   ls_pathname,   ls_filename  
  integer   li_value,li_FileNum,loops,i  
  long   ll_fileLength,bytes_read,new_pos  
  blob   b,   tot_b  
   
        //   Get   the   file   length,   and   open   the   file  
          ll_fileLength=   FileLength(photopath)  
          li_FileNum   =   FileOpen(photopath,   &  
        StreamMode!,   Read!,   LockRead!)  
   
          //   Determine   how   many   times   to   call   FileRead  
          IF   ll_filelength   >   32765   THEN  
      IF   Mod(ll_filelength,   32765)   =   0   THEN  
      loops   =ll_filelength/32765  
      ELSE  
      loops   =   (ll_filelength/32765)   +   1  
      END   IF  
          ELSE  
        loops   =   1  
          END   IF  
          //   Read   the   file  
          new_pos   =   1  
          FOR   i   =   1   to   loops  
      bytes_read   =   FileRead(li_FileNum,   b)  
      tot_b   =   tot_b   +   b  
          NEXT  
          FileClose(li_FileNum)  
  return   tot_b


 

 
热门推荐笔记本: IBM笔记本
相关文章:
webmaster:popbb@126.com   最佳浏览:1024X768 MSIE
©2007 popbb.net All Rights Reserved