ExecuteWithResults Method

SQLServer.Database Object

Description

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

Visual Basic

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

C++

HRESULT pDatabase->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

EXECUTE