在使用sqlserver数据库的OpenRowSet函数时,会遇到三种驱动方式: 1. MSDASQL驱动 SELECT TOP 10 * FROM OPENROWSET('MSDASQL', 'DRIVER={SQL Server};SERVER=xxx;UID=xx;PWD=xxx;', 'select * from AdventureWorks.HumanResources.Employee') 2. SQLNCLI驱
在使用sqlserver数据库的OpenRowSet函数时,会遇到三种驱动方式:
1. MSDASQL驱动
SELECT TOP 10 *
FROM OPENROWSET('MSDASQL', 'DRIVER={SQL Server};SERVER=xxx;UID=xx;PWD=xxx;', 'select * from AdventureWorks.HumanResources.Employee')
2. SQLNCLI驱动
SELECT TOP 10 *
FROM OPENROWSET('SQLNCLI', 'SERVER=xxx;UID=xx;PWD=xxxxx;', 'select * from AdventureWorks.HumanResources.Employee')
3. SQLOLEDB驱动
SELECT TOP 10 *
FROM OpenRowSet('SQLOLEDB', 'xxx'; 'xx'; 'xxx', AdventureWorks.HumanResources.Employee)
先看一下定义