Position:Home>Database Development> SQL Server database guides derive data means is compared
SQL Server database guides derive data means is compared
From;  Author:Stand originally


SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0' ,

'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=abc.mdb;Persist Security

Info=False') . . .

Table1

OPENROWSET is equivalent to volume of a record, can will regard as directly a watch or view are used.

Inquire through OPENROWSETE in SQL Server the Table1 in Access database Abc.mdb is expressed

SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0' , 'abc.mdb';

'admin';'' , 'SELECT * FROM Table1' )

(2) nimbleness is different.

OPENDATASOURCE can open the watch in corresponding database or view only, if need to filter, can undertake handling in SQL Server only. And OPENROWSET can be in open a database while undertake filtering to its, be like the example above, SELECT * FROM Table1 can be used to undertake inquiring to the data table in Abc.mdb in OPENROWSET, and OPENDATASOURCE can cite only Table1, and cannot inquire Table1. Accordingly, OPENROWSET compares OPENDATASOURCE more agile.



Previous 1 2Next
Previous:Solve SQL Server not to allow to have long-range link
Next:Optimize the strategy that memory of SQLServer database server configures