是否有Delphi的实现:C ++ for MVS中的TClientDataSet?

时间:2022-05-15 04:19:58

I want to migrate from Embarcadero Delphi to Visual Studio, but without a TClientDataset class it is very difficult. This class represents an in-memory dataset.

我想从Embarcadero Delphi迁移到Visual Studio,但是没有TClientDataset类就很难了。此类表示内存中的数据集。

I can't find any class like TClientDataset.

我找不到像TClientDataset这样的类。

Can anyone help me find something like this please?

谁能帮我找到这样的东西呢?

2 个解决方案

#1


1  

Visual studio has DataSet and DataTable classes which are very close to what a TClientDataSet is in Delphi.

Visual Studio有DataSet和DataTable类,它们与Delphi中的TClientDataSet非常接近。

See http://msdn.microsoft.com/en-us/library/system.data.dataset.aspx

#2


2  

The .NET couple System.Dataset and System.Datatable are very different beasts from the TClientDataset.

.NET耦合System.Dataset和System.Datatable是与TClientDataset完全不同的野兽。

Filtering and binding are done on another class (Dataview), dotNET DataGrid hides this a little. Extract method is the nearest a datatable provides in termes of filtering (it returns an array of pointers to DataRows).

过滤和绑定在另一个类(Dataview)上完成,dotNET DataGrid隐藏了一点。 Extract方法是最接近数据表提供的过滤方法(它返回一个指向DataRows的指针数组)。

Grouping is not so powerful as in TClientDataset, as also indexing is poorer. (As in dotNet 1.1)

分组不像TClientDataset那么强大,因为索引也较差。 (如dotNet 1.1中所述)

There's no record cursor on DataTable, so the positioning is on the visual controls - it takes 10 lines of codes just to get the actual record out of a DataGrid.

DataTable上没有记录光标,因此定位在可视控件上 - 只需10行代码就可以从DataGrid中获取实际记录。

So the easiness of positioning the cursor on grid and get the value of the field of the dataset does not exist.

因此,不存在将光标定位在网格上并获取数据集字段值的简便性。

#1


1  

Visual studio has DataSet and DataTable classes which are very close to what a TClientDataSet is in Delphi.

Visual Studio有DataSet和DataTable类,它们与Delphi中的TClientDataSet非常接近。

See http://msdn.microsoft.com/en-us/library/system.data.dataset.aspx

#2


2  

The .NET couple System.Dataset and System.Datatable are very different beasts from the TClientDataset.

.NET耦合System.Dataset和System.Datatable是与TClientDataset完全不同的野兽。

Filtering and binding are done on another class (Dataview), dotNET DataGrid hides this a little. Extract method is the nearest a datatable provides in termes of filtering (it returns an array of pointers to DataRows).

过滤和绑定在另一个类(Dataview)上完成,dotNET DataGrid隐藏了一点。 Extract方法是最接近数据表提供的过滤方法(它返回一个指向DataRows的指针数组)。

Grouping is not so powerful as in TClientDataset, as also indexing is poorer. (As in dotNet 1.1)

分组不像TClientDataset那么强大,因为索引也较差。 (如dotNet 1.1中所述)

There's no record cursor on DataTable, so the positioning is on the visual controls - it takes 10 lines of codes just to get the actual record out of a DataGrid.

DataTable上没有记录光标,因此定位在可视控件上 - 只需10行代码就可以从DataGrid中获取实际记录。

So the easiness of positioning the cursor on grid and get the value of the field of the dataset does not exist.

因此,不存在将光标定位在网格上并获取数据集字段值的简便性。