比如我将C:\boot.ini文件里的数据保存到数据库 然后在提出来怎么让他的格式不变?

解决方案 »

  1.   

    找了段代码,改改应该可用。
    var 
    MS:TMemoryStream; 
    if DialogPicture.Execute then 
    begin 
      if UpperCase(ExtractFileExt(DialogPicture.FileName)) <> '.BMP' then 
      begin 
       MSG_BOX_GOOD(M0237); 
       Abort; 
      end; 
      try 
       MS := TMemoryStream.Create; 
       MS.LoadFromFile(DialogPicture.FileName); 
       if not( qryHr_PersonnelArchives.State in [dsInsert,dsEdit]) then 
       begin 
         qryHr_PersonnelArchives.Edit; 
       end; 
       TBlobField(qryHr_PersonnelArchives.FieldByName('PersonPicture')).LoadFromStream(ms); 
      finally 
        ms.Free; 
      end; 
    end;  
      

  2.   


    BLOB 字段  ——Binary Large Object
    用这个关键字搜索,也能找到大量代码,
    嘿嘿。楼主,可以结贴了。