//使用 TFieldDef 建表: begin with ClientDataSet1.FieldDefs do begin Add('Name' , ftString, 12, True); { True 表示是必填字段 } Add('Age', ftInteger); end; ClientDataSet1.CreateDataSet; end; //使用 TField(这里是用其子类)建表: begin with TStringField.Create(Self) do begin Fi…
if CDSUserFunc.Locate('mod_id;res_id', VarArrayOf([UserFunc.MOD_ID, UserFunc.RES_ID]), [loCaseInsensitive]) then begin CDSUserFunc.Delete; end; if not CDS_UserDict.Locate('DICT_ID', strDictId, [loCaseInsensitive]) then begin…
function GetcdsAccountsData: OleVariant; var ASQLQuery: TSQLQuery; Adsp: TProvider; begin ASQLQuery:=CreateSQLQuery; Adsp:=TProvider.Create(nil); with ASQLQuery do try SQL.Add('Select AccID, pAccID, AccName, AccFullName, Explan, Grade, Property, Deta…