//////////////试试看//////////////////////////////////////////
if DBGrid1.Fields[3].Asstring='图型' then kzm:='.jpg';
    if Query1.IsEmpty = false then
        begin
          if not DirectoryExists(ExtractfileDir(application.ExeName)+'\temp') then 
          if not CreateDir(ExtractfileDir(application.ExeName)+'\temp') then 
          raise Exception.Create('Cannot create '+ExtractfileDir(application.ExeName)+'\temp');
        
        filename:=ExtractfileDir(application.ExeName)+'\temp\fujian'+kzm;
        fjid := DBGrid1.Fields[1].AsInteger;
        sqlstr := 'select fjnr from oadbo.bw_fjb where fjid =' + IntToStr(fjid);
        Query2.Close;
        Query2.SQL.Clear;
        Query2.SQL.Add(sqlstr);
        Query2.Open;
        TBlobField(Query2.FieldByName('fjnr')).SaveToFile(filename);
        shellexecute(self.Handle,'open',pchar(filename),nil,nil,SW_SHOWNA);
        end