ExecuteCommandByName Method

SQL-NS

SQL-NS

ExecuteCommandByName Method

The ExecuteCommandByName method executes the command identified by the bstrCommand parameter.

Applies To
SQLNamespaceObject Object
Syntax

object.ExecuteCommandByName(
bstrCommand As String
[hWnd] As Long,
[modality] As SQLNSModality)

Parts

object

Expression that evaluates to an object in the Applies To list

bstrCommand

Name of the command

hWnd

Parent window handle

modality

Modality of the window

Prototype (C/C++)

HRESULT ExecuteCommandByName(
BSTR bstrCommand,
long hwnd,
SQLNSModality modality);

Remarks

The ExecuteCommandByName method optionally provides a parent window (by default, the window specified by the Initialize method) and suggests preference in modality of the user interface. Calling ExecuteCommandByName will make an application dependent on the language of the system where the application runs. To avoid this behavior, call ExecuteCommandByID.