OLEDBConnection 和SQLConnection 有什么区别
.NET
答:OLEDBConnection,连接池将由提供程序自动处理,所以您不必自己进行管理。SQLConnection,连接池被隐式管理,但也提供选项允许您自己管理池。SQLConnection是SQL专用的,OLEDBConnection可以对其他数据库的连接,如Access。
同类其他面试题 点击新一篇或旧一篇可浏览全部同类面试题
新一篇:采用怎样的方法保证数据的完整性?
答:OLEDBConnection,连接池将由提供程序自动处理,所以您不必自己进行管理。SQLConnection,连接池被隐式管理,但也提供选项允许您自己管理池。SQLConnection是SQL专用的,OLEDBConnection可以对其他数据库的连接,如Access。
版权声明:本站大部分内容为原创! 另有少部分内容整理于网络,如需转载本站内容或关切版权事宜请联系站长。未经允许,严禁复制转载本站内容,否则将追究法律责任。 本站欢迎与同类网站建立友情链接,请联系QQ:176687814
They are two different implementations of IDBConnection. SqlConnection is
the SqlServer implementation, OleDb was everything ‘else’ . That’s been
minimized to some degree since the addition of the ODBC and Oracle libraries
in the 1.1 framework so OleDbConnection should probably be renamed to
PeopleWhoStillUseMSAccessConnection
The answer to your question though. Back in the old school days, a bunch of
VB programmers started whining b/c data access was too hard. So Microsoft
came out with ODBC which was an agreed upon spec that you could use to
access any database that complied with it. They still complained that it
was still to hard. So they came up with OleDB, the next version of
DataAccessForEveryone. From there things morphed into ADO and then more
recently ADO.NET. But basically it’s just a spec that vendors can agree or
not agree to abide by, most have but some haven’t.