DGC.Data Programmer's Reference

IDal.CreateParameter Method (String, ParameterTypes, ParameterDirections, Int32, Object)

Creates a new instance of the DALParameter class with the parameter name, the ParameterTypes, the ParameterDirections, the size, and the value of the parameter initialized.

[Visual Basic]
Function CreateParameter( _
   ByVal parameterName As String, _
   ByVal parameterType As ParameterTypes, _
   ByVal direction As ParameterDirections, _
   ByVal length As Integer, _
   ByVal value As Object _
) As DALParameter
[C#]
DALParameter CreateParameter(
   string parameterName,
   ParameterTypes parameterType,
   ParameterDirections direction,
   int length,
   object value
);

Parameters

parameterName
The name of the parameter to map.
parameterType
One of the ParameterTypes values.
direction
One of the ParameterDirections values.
length
The length of the parameter.
value
The value of the parameter.

Return Value

A DALParameter object.

Remarks

This version of the method is designed for use with character based types such as DalChar, DalVarchar etc.

Example

The following example creates a DALParameter with its name, type, direction, size, and value initialized.

[Visual Basic] 
    Dim p As DGC.Data.Parameter 
    p = dal.CreateParameter("@pDescription", ParameterTypes.DalVarchar, ParameterDirections.DalInput, 100, "My description text.") 

See Also

IDal Interface | DGC.Data Namespace | IDal.CreateParameter Overload List