A.F.A.I.K. The OPENROWSET function can also be referenced as the target table of an INSERT, UPDATE, or DELETE statement, subject to the capabilities of the OLE DB provider. Although the query may return multiple result sets, OPENROWSET returns only the first one.
OPENROWSET can be used to access remote data from OLE DB data sources only if the DisallowAdhocAccess registry option is explicitly set to 0. When this option is not set, the default behavior does not allow ad hoc access.
OPENROWSET does not accept variables for its arguments.
Syntax of OPENROWSET Function :
OPENROWSET ( 'provider_name'
, { 'datasource' ; 'user_id' ; 'password'
| 'provider_string' }
, { [ catalog. ] [ schema. ] object
| 'query' } )
provider_name is a character string that represents the friendly name of the OLE DB provider as specified in the registry. It has no default value.
datasource is a string constant that corresponds to a particular OLE DB data source.
userid is a string constant that is the username passed to the specified OLE DB provider.
password is a provider-specific connection string that is passed in as the DBPROP_INIT_PROVIDERSTRING property to initialize the OLE DB provider.
catalog is a name of the catalog or database in which the specified object resides.
schema is a name of the schema or object owner for the specified object.
object is a object name that uniquely identifies the object to manipulate.
query is a string constant sent to and executed by the provider.