在paradox里怎么在字段里存图片啊?

解决方案 »

  1.   

    字段设置为Graphic类型
    用Blob大字段存取
      

  2.   

    DataCellBlob := TBlobField(GQuery.FieldByName('CellFile'));
        if not DataCellBlob.IsNull then {如果不为空,清除原有文件}
        begin
          GQuery.Close;
          GQuery.SQL.Text := 'UPDATE 检查项目 SET CellFile = :CllFile ' +
                              ' WHERE Inspection_ID = :TID';
          GQuery.Parameters.ParamByName('CllFile').DataType := ftBlob;
          GQuery.Parameters.ParamByName('CllFile').Value := '';
          GQuery.Parameters.ParamByName('TID').Value := vstrInspection_ID;
          GQuery.ExecSQL;
        end;
      

  3.   

    GQuery.Close;
        GQuery.SQL.Text := 'UPDATE 检查项目 SET CellFile = :CllFile ' +
                           ' WHERE Inspection_ID = :TID';
        GQuery.Parameters.ParamByName('CllFile').DataType := ftBlob;
        GQuery.Parameters.ParamByName('CllFile').LoadFromFile(StrFilePath,ftBlob);
        GQuery.Parameters.ParamByName('TID').Value := vstrInspection_ID;
        GQuery.ExecSQL;
      

  4.   

    比如说我建了一个paradox数据表,字段是考号和照片,考号是long型,照片是graphic型.我如果想向表中插入数据,比如考号为101,照片为pic101.jpg,该如何做啊?
    我看到database desktop的帮助文件里提到用copy to graphic file dialog box,但我不知如何操作,清指教.