Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » UltraLite - .NET Programming » UltraLite .NET 2.0 API Reference » ULParameterCollection class » Add methods


Add(String, ULDbType, Int32, String) method

Adds a new ULParameter, created using the specified parameter name, data type, length, and source column name, to the collection.

Visual Basic

Public Function Add( _
   ByVal parameterName As String, _
   ByVal ulDbType As ULDbType, _
   ByVal size As Integer, _
   ByVal sourceColumn As String _
) As ULParameter

public ULParameter Add(
   string  parameterName,
   ULDbType ulDbType,
   int size,
   string  sourceColumn
  • parameterName   The name of the parameter. For unnamed parameters, use an empty string ("") or a null reference (Nothing in Visual Basic) for this value. In UltraLite.NET, parameter names are not used by ULCommand.

  • ulDbType   One of the iAnywhere.Data.UltraLite.ULDbType values.

  • size   The length of the parameter.

  • sourceColumn   The name of the source column to map.

Return value

The new ULParameter object.


All parameters in the collection are treated as positional parameters and must be added to the collection in the same order as the corresponding question mark placeholders in the ULCommand.CommandText. For example, the first parameter in the collection corresponds to the first question mark in the SQL statement, the second parameter in the collection corresponds to the second question mark in the SQL statement, and so on. There must be at least as many question marks in the ULCommand.CommandText as there are parameters in the collection. Nulls are substituted for missing parameters.

See also