ADOQuery SQL statement is: select A, Sum (B) B from t
ADOQuery. Open;
ClientDataSet1. Active:=true;
DBGrid1 B field in the data displayed is normal
And the other a set of controls ClientDataSet2 + DataSource2 + DBGrid2,
button to write codeClientDataSet2. Data:=ClientDataSet1. Data;
DBGrid2 B field data is not shown its wonderful, completely wrong,
Everyone can have a try, don't know why, for help,,,,
CodePudding user response:
Bad conditions described is too little, analysis,CodePudding user response:
Estimate the clientdataset fieldlist has a problem, assignment data, to ensure that the same fieldCodePudding user response:
Estimate clientdataset2 fieldlist has a problem, assignment before data, to ensure that both type and order of clientdataset field is the sameCodePudding user response:
ClientDataSet1. Active:=true;Open DBGrid1 ClientDataSet1
ClientDataSet2. Data:=ClientDataSet1. Data; This new, ClientDataSet2 ought to read database data,
CodePudding user response:
ClientDataSet2 is no createdataset, create data sets,Another possibility is that two clientdataset field is not consistent,