Share via


IParameterFactory.CreateScalarParameter Method (String, IScalarDataType, Boolean, String)

Creates an IScalarParameter object that has the specified name, data type, and default value.

Namespace:  Microsoft.SqlServer.Management.SqlParser.MetadataProvider
Assembly:  Microsoft.SqlServer.Management.SqlParser (in Microsoft.SqlServer.Management.SqlParser.dll)

Syntax

'Declaration
Function CreateScalarParameter ( _
    name As String, _
    dataType As IScalarDataType, _
    isOutput As Boolean, _
    defaultValue As String _
) As IScalarParameter
'Usage
Dim instance As IParameterFactory
Dim name As String
Dim dataType As IScalarDataType
Dim isOutput As Boolean
Dim defaultValue As String
Dim returnValue As IScalarParameter

returnValue = instance.CreateScalarParameter(name, _
    dataType, isOutput, defaultValue)
IScalarParameter CreateScalarParameter(
    string name,
    IScalarDataType dataType,
    bool isOutput,
    string defaultValue
)
IScalarParameter^ CreateScalarParameter(
    String^ name, 
    IScalarDataType^ dataType, 
    bool isOutput, 
    String^ defaultValue
)
abstract CreateScalarParameter : 
        name:string * 
        dataType:IScalarDataType * 
        isOutput:bool * 
        defaultValue:string -> IScalarParameter 
function CreateScalarParameter(
    name : String, 
    dataType : IScalarDataType, 
    isOutput : boolean, 
    defaultValue : String
) : IScalarParameter

Parameters

  • isOutput
    Type: System.Boolean
    true to create an output parameter; otherwise, false.

Return Value

Type: Microsoft.SqlServer.Management.SqlParser.Metadata.IScalarParameter
An IScalarParameter object that has the specified name, data type, and default value.