包装DataTable对象,显示Recordset接口(_recordset) [英] Wrapper a DataTable object, showing a Recordset interface (_recordset)

查看:97
本文介绍了包装DataTable对象,显示Recordset接口(_recordset)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的研究中,发现了 Recordsets 对象中 DataTable 对象的转换方法,发现的所有代码均显示可伸缩性较差,提起崩溃应用程序(通常是内存不足).
因此,我想对包装器一个 DataTable 对象进行实验,并显示一个 Recordset 接口(_recorset).


我需要在vb6网格(旧应用程序)中使用.NET中的现有组件.通过转换"Recordset"对象中的"DataTable"对象,系统从大约3000条记录中缺少内存. VB6应用程序很旧,我想使用.NET组件而不更改此应用程序的结构,该应用程序有数百个客户端在使用.由于记录集中"DataTable"的转换不能提供可伸缩性,因此我想创建一个封装"DataTable"对象的类,并通过接口提供一个对象"recordset".

in my researchs to find out methods for transformation the DataTable objects in Recordsets objects, all code found presents poor scalability, provocating crash application(out of memory, commonly).
so, I want experiment wrapper a DataTable object and show a Recordset interface (_recorset).


I need to use existing components, made in. NET, in vb6 grids (old application). By transforming the "DataTable" object in the "Recordset" object, from about 3000 records the system lacks memory. The VB6 application is old, I want to use components .NET without changing the structure of this application, which has hundreds of clients using. As the transformation of "DataTable" in recordset not offer scalability, I''m wanting to create a class that encapsulates a "DataTable" object, and through interface, offers an object "recordset".

推荐答案

我只能猜测您实际上是在尝试做什么,以及可怕的性能"是什么意思.

DataTable对象是可以的,但是如果您要处理大量记录,则使用DataReader会比对DataSet中的一组记录进行插入提供更多的灵活性和更好的性能.并且无需以过时的结构(如RecordSet对象)包装" DataTable.
I can only guess at what you''re really trying to do and what you mean by "horrible performance".

A DataTable object is OK, but if you''re processing a large number of records, using a DataReader offers a lot more flexibility and much greater performance than interating over a set of records in a DataSet. And without "wrapping" a DataTable in an outdated structure like a RecordSet object.


这篇关于包装DataTable对象,显示Recordset接口(_recordset)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆