delphi7找不到TBDEClientDataSet控件的解决方案[3]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 mzyp2002 的 blog

                field := dataset.fieldbyname(list.ffieldname[i]);
              except
                field := nil;
              end;
            end else
              field := nil;
            if assigned(field) then
            begin
              if field.datatype <> ftstring then
                list[i].datatype := field.datatype
              else if tstringfield(field).fixedchar then
                list[i].datatype := ftfixedchar
              else
                list[i].datatype := ftstring;
            end;
          end;
        except
          // ignore all exceptions
        end;
      finally
        dataset.free;
      end;
    finally
      if list.count > 0 then
        params.assign(list);
      list.free;
    end;
  end;
end;

procedure tbdeclientdataset.setsql(const value: string);
begin
  if assigned(provider.dataset) then
  begin
    tquery(provider.dataset).sql.clear;
    if value <> '' then
      tquery(provider.dataset).sql.add(value);
    inherited setcommandtext(value);
  end else
    databaseerror(snodataprovider);
end;

 

procedure tbdeclientdataset.loaded;
begin
  inherited loaded;
  if fstreamedactive then
  begin
    setactive(true);
    fstreamedactive := false;
  end; 
end;

function tbdeclientdataset.getmasterfields: string;
begin
  result := inherited masterfields;
end;

procedure tbdeclientdataset.setmasterfields(const value: string);
begin
  inherited masterfields := value;
  if value <> '' then
    indexfieldnames := value;
  fdataset.fkeyfields := '';
end;

procedure tbdeclientdataset.setcommandtext(value: string);
begin
  inherited setcommandtext(value);
  fcommandtext := value;
  if not (csloading in componentstate) then
  begin
    fdataset.fkeyfields := '';
    indexfieldnames := '';
    masterfields := '';
    indexname := '';
    indexdefs.clear;
    params.clear;
    if (csdesigning in componentstate) and (value <> '') then
      setparamsfromsql(value);
  end;
end;

function tbdeclientdataset.getconnection: tdatabase;
begin
  result := fdatabase;
end;

procedure tbdeclientdataset.setconnection(value: tdatabase);
begin
  if value = fdatabase then exit;
  checkinactive;
  if assigned(value) then
  begin
    if not (csloading in componentstate) and (value.databasename = '') then
      databaseerror(sdatabasenamemissing);
    fdataset.databasename := value.databasename;
  end else
    fdataset.databasename := '';
  fdatabase := value;
end;

function tbdeclientdataset.getquotechar: string;
begin
  result := '';
  if assigned(fdataset) then
    result := fdataset.psgetquotechar;
end;

procedure tbdeclientdataset.clonecursor(source: tcustomclientdataset; reset: boolean;
   keepsettings: boolean = false);
begin
  if not (source is tbdeclientdataset) then

本文关键:delphi7找不到TBDEClientDataSet控件的解决方案
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top