The ExecuteWithParam method executes the command associated with the SQLNamespaceCommand object, which is related to the user interface component associated with the command. A parameter can be passed with the command.
object.ExecuteWithParam(
[ hWnd ] ,
[ modality ] ,
[ pVarParam ] )
object
Expression that evaluates to an object in the Applies To list
hWnd
Long integer that specifies the parent window handle
modality
SQLNSModality constant that indicates modality type as described in Settings
pVarParam
Variant that contains the value to pass as a parameter
Set modality using these values.
Constant | Value | Description |
---|---|---|
SQLNamespace_DontCare | 0 | Default window behavior. |
SQLNamespace_PreferModal | 1 | Modal window behavior (if available). |
SQLNamespace_PreferModeless | 2 | Modeless window behavior (if available). |
HRESULT ExecuteWithParam(
long hwnd,
SQLNSModality modality,
LPVARIANT pVarParam)
The ExecuteWithParam method optionally provides a parent window. By default, the window handle specified in the Initialize method will be used. The modality parameter suggests preference in modality of the user interface. SQL Namespace, due to the modality of a specific user interface component, can overrule the requested modality. If there is no parent window handle specified during the Initialize call and the modality is SQLNamespace_PreferModal, the value of this parameter cannot be NULL.
ExecuteWithParam extends the functionality of the Execute method by allowing an application to pass a parameter in the optional pVarParam parameter.