ExecuteWithResults Method

SQLServer.RemoteServer Object

Description

Executes a Transact-SQL statement on a remote server. Returns results in a QueryResults object.

Visual Basic

QueryResults = RemoteServer.ExecuteWithResults ( [Command :=] strSQLStatement )

C++

HRESULT pRemoteServer->ExecuteWithResults (
SQLOLE_LPCSTR
strSQLStatement,
LPSQLOLEQUERYRESULTS*
ppQueryResults );

Elements

Element Type Description

QueryResults QueryResults Returned QueryResults object
strSQLStatement String SQL statement

QueryResults

The contents of the QueryResults object depend on the Transact-SQL statement.

Reference

sp_sqlexec