ExecuteImmediate Method (LinkedServer, RemoteServer) (SQL-DMO)

The ExecuteImmediate method connects to a linked server or remote server data source, executes a Transact-SQL command batch on the connection, and disconnects.

Applies To
LinkedServer Object RemoteServer Object

Syntax

object.ExecuteImmediate( Command , [ Length ] )

Part Description
object Expression that evaluates to an object in the Applies To list.
Command String specifying a Transact-SQL command batch.
Length Optional. Long integer indicating the statement batch length.

Remarks

When using the ExecuteImmediate method with the LinkedServer object, command batch syntax is provider-specified. For more information, see your OLE DB provider documentation.

Prototype (C/C++)

HRESULT ExecuteImmediate(
SQLDMO_LPCSTR Command,
long lLength CPPDEFAULT(= 0));

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.