数据库的表的记录的字段 到内存流,再
dxFlowChart1.LoadFromStream(AStream);dxFlowChart1应该有编辑的功能最后保存到流再存回数据库:
dxFlowChart1.SaveToStream(AStream); ...

解决方案 »

  1.   

    procedure Tfrm_FlowChart.loadFlowStream(i: Integer; classname: string; tabs: TRzTabSheet);
    var
      strSql: string;
      AStream: TMemoryStream;
    begin
      //定义图示控件
      dxFlowChart1.Align := alClient;
      dxFlowChart1.OnKeyDown := acFlowChartKeyDown;
      dxFlowChart1.BeginUpdate;
      dxFlowChart1.Clear;  //从数据库获取符合条件的数据
      strSql := 'select * from T_BaseMenu where f_parentid =1 and f_enabled=1 and f_caption =''' + classname + '''';  //执行查询
      funDM.QuerySQL(strSql, qry_Class); //判断 “f_flowchart” 不为空
      if not (TBlobField(qry_Class.FieldByName('f_flowchart')).isNull) then
      begin
        AStream := TMemoryStream.Create;
       
        //将f_flowchart数据取出到内存流
        TBlobField(qry_Class.FieldByName('f_flowchart')).SaveToStream(AStream);
        AStream.Position := 0;    //加载到图示控件
        dxFlowChart1.LoadFromStream(AStream);
        AStream.Free;
      end;
      dxFlowChart1.EndUpdate;
    end;
    2.  想修改,应该 dxFlowChart1 可以编辑。
    dxFlowChart1.SaveToStream(AStream);然后保存到数据库字段 f_flowchart。