开发者

Ado Recordset MoveNext() in .NET very slow?

开发者 https://www.devze.com 2023-02-17 08:59 出处:网络
How comes that when I receive a ADO Recordset (with about 70.000 records) from an VB application in my .NET application, the 1st example takes only 6 sec, whereas the 2nd example takes over 150 sec?

How comes that when I receive a ADO Recordset (with about 70.000 records) from an VB application in my .NET application, the 1st example takes only 6 sec, whereas the 2nd example takes over 150 sec?

1st:

dynamic recordset = myVBObject.GetRecordset();
recordset.GetRecords();

2nd:

dynamic recordse开发者_运维技巧t = myVBObject.GetRecordset();
while (resultComObject.AbsolutePosition != ADODB.PositionEnum.adPosBOF && resultComObject.AbsolutePosition != ADODB.PositionEnum.adPosEOF)
{
    resultComObject.MoveNext();
}

Is there any way to make the moving through the records faster ?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号