Version

CreateParameter(String,DbType) Method

Creates an implementation-specific database parameter with the specified type.
Syntax
'Declaration
 
Protected Overloads Function CreateParameter( _
   ByVal parameterName As String, _
   ByVal parameterType As DbType _
) As IDbDataParameter
protected IDbDataParameter CreateParameter( 
   string parameterName,
   DbType parameterType
)

Parameters

parameterName
Name of the database parameter.
parameterType
Data type of the database parameter, selected from the list specified in the DbType enumeration.

Return Value

An implementation of IDbDataParameter that describes the parameter created in a database-independent way, but that is compatible with IDbCommand instances created from the current WebSchedule data provider Connection (for example, through CreateCommand).
Remarks

This factory method is called frequently in the early stages of data binding to populate the IParameterCollection of database commands necessary to complete the bind. Some data providers allow nameless parameters, but others do not. Therefore, inheritors calling CreateParameter are encouraged to specify a name for their parameter.

By default, all parameters created by this method are input (with respect to the database) parameters. Their values will be transmitted from the web server to the database server.

CreateParameter
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also