当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 看一个程序代码,别的函数不敢说都明白了,查了 msdn 至少也知道是干什么的 这个 updatedata 函数看了 n 遍 msdn 也看不明白,可能是e文水平太差了 还请哪位用中文解释一下 ......
    摘要: // #include <iostream> #include <iostream.h> #include <ctype.h> /***** ***** ineluctable modality of the visible number of vowel a: 2 number of vowel e: 4 number of vowel i: 4 nu......


如何在存储过程中将一个文件存储到image,ntext列中呢

请问如何在存储过程中将一个文件存储到image,ntext列中呢?

NO.1   作者: pengdali

下面是一个拷贝图像到SQL   Server的pubs数据库的例子,   表名pub_info,   字段名logo,图像文件名picture.bmp,保存到pub_id=0736记录    
  sp_textcopy   @srvname   =   ServerName,    
                          @login   =   Login,    
                          @password   =   Password,    
                          @dbname   =   pubs,    
                          @tbname   =   pub_info,    
                          @colname   =   logo,    
                          @filename   =   c:\picture.bmp,    
                          @whereclause   =   "   WHERE   pub_id=0736   ",    
                          @direction   =   I

NO.2   作者: SophiaWang

Examples  
  This   example   puts   the   text   pointer   into   the   local   variable   @ptrval,   and   then   WRITETEXT   places   the   new   text   string   into   the   row   pointed   to   by   @ptrval.  
   
  USE   pubs  
  GO  
  EXEC   sp_dboption   pubs,   select   into/bulkcopy,   true  
  GO  
  DECLARE   @ptrval   binary(16)  
  SELECT   @ptrval   =   TEXTPTR(pr_info)    
  FROM   pub_info   pr,   publishers   p  
  WHERE   p.pub_id   =   pr.pub_id    
        AND   p.pub_name   =   New   Moon   Books  
  WRITETEXT   pub_info.pr_info   @ptrval   New   Moon   Books   (NMB)   has   just   released   another   top   ten   publication.   With   the   latest   publication   this   makes   NMB   the   hottest   new   publisher   of   the   year!  
  GO  
  EXEC   sp_dboption   pubs,   select   into/bulkcopy,   false  
  GO  
   
 


    摘要: 如题 ......
» 本期热门文章:
· 热门栏目:
» 相关精选文章
» 其它相关:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE