[读书心得] 需要在.net中使用ADO2.x的情况

今天有空翻了下《Professional ADO.NET Programming》,里面讲到了一个需要在.net使用老ado情况,感兴趣,贴出来给大家看看。
文中提到了有两种情况:

第一种情况:ado中有更加灵活的锁机制和游标类型,当应用程序几乎不会出现多用户共同连接的情况出现,并且你需要查看用户对数据源的操作时,ado可能是个更好的选择。

第二种情况:你需要使用Record和Stream对象,例如当需要使用OLE DB Provider for Exchange 2000(ExOLEDB),或者是Internet Publishing(MSDAIPP)的时候,就不得不使用ado了,因为它们在ado.net暂时还不被支持。



附上原文:

Using ADO 2.x in .NET

Although we've stressed that you should use ADO.NET rather than ADO whenever possible, there are still a couple of scenarios where there's really no alternative but to use traditional ADO. We've mentioned these already, but it's worth reiterating them in one place:

1 If you absolutely have to use a connected recordset, and need to be able to update the data source. One reason for this might be the more flexible lock and cursor types available in ADO. If your application has a small enough number of users to permit simultaneous connections and you need to be able to see changes to the data source as they are made, then ADO may be a better choice.
2 If you need to use the ADO Record and Stream objects, for example if you're using the OLE DB provider for Exchange 2000 (ExOLEDB) or Internet Publishing (MSDAIPP). Until the OleDb provider is updated to support the OLE DB 2.5 interfaces or .NET providers for these data sources become available, you'll need to use ADO.
posted @ 2005-05-12 16:24  OOP  阅读(571)  评论(2编辑  收藏  举报