Home > Back-end > Add three layers from the table data
Add three layers from the table data
Time:09-28
The server didn't do the code Conn: TADOConnection; The main table DS_main: TADODataSet; From the table DS_item: TADODataSet; DSP_main: TDataSetProvider; Associated with DS_main DSmain: TDataSource; DS_MAIN established master-slave relationship with DS_itme Set up the nests ======================== The client DCOM: TDCOMConnection; Cds_main: the TClientDataSet; Cds_mainorderID: TStringField; Cds_mainorderDate: TStringField; Cds_mainCustomer: TStringField; Cds_mainDS_item: TDataSetField;
Add the code keystrokes With the dm. Cds_main do The begin Append. FieldByName (" orderid "). AsString:=e_djbh. Text; FieldByName (" orderdate "). AsString:=formatdatetime (' - dd yyyy - mm, d_rq. Date); FieldByName (" Customer "). AsString:=e_kh. Text; end; It is unclear how fine table data to add, please give us a hand to hand, thank you
CodePudding user response:
The main table, don't have to add table, Add fine table must have the main table, through the foreign key relationships, details in the table to have a field id, Delete the main table when certain details delete finished first,
CodePudding user response:
The database must be set up from the table and the relationship between the main table, set the foreign key to guarantee the accuracy of the data
CodePudding user response:
The main table AfterScroll event calls from the Open SQL=the select * from table from the table where the table the key fields of=key fields of the main table