在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
BindSourceDB4.DataSet :=nil; BindSourceDB4.DataSet :=FDMemTable1; grid绑定后显示数据正常,第二次赋值BindSourceDB4.DataSet就报错了。RAD berlin 存在此问题。
error in ios
windows平台下正常,IOS下报错。 Data.Bind.DBScope.pas,edit file add to current project,compiler that's ok! function TCustomBindSourceDB.CreateSubDataSource: TDataSource; begin Result := TSubDataSource.Create(Self); Result.Name := 'SubDataSource'; // Do not localize Result.SetSubComponent(True); end; procedure TCustomBindSourceDB.SetDataSet(const Value: TDataSet); var LDataSource: TDataSource; begin if Value <> DataSet then begin if Value <> nil then begin if (FDataSource = nil) or (not (csSubComponent in FDataSource.ComponentStyle)) then begin LDataSource := CreateSubDataSource; LDataSource.DataSet := Value; Self.DataSource := LDataSource; end; end else DataSource := nil; if FDataSource <> nil then begin FDataSource.DataSet := Value; SetLinks(FDataSource); end; end; end;
DataSource := nil; change to if DataSource<>nil then 用query的EnableControls、DisableControls两个方法实现数据断开连接,依然会报错,所以还是用BindSourceDB4.DataSet=nil来断开。 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论