Add(String,UniDbType) Method
Adds a
UniParameter to the
UniParameterCollection given the parameter name and data type.
The following example creates a
UniParameterCollection, adds instances of
UniParameter to the collection, and returns a reference to the new
UniParameter.
public void CreateUniParamColl() {
UniCommand myCommand = new UniCommand("SELECT * FROM Test.Dept WHERE DeptNo = :DeptNo", myConn);
UniParameterCollection myParamCollection = myCommand.Parameters;
object myParm = new UniParameter("DeptNo", UniDbType.Integer);
int pIndex = myParamCollection.Add(myParm);
}
Public Sub CreateUniParamColl(myConn As UniConnection)
Dim myCommand As UniCommand = New UniCommand("SELECT * FROM Test.Dept WHERE DeptNo = :DeptNo", myConn)
Dim myParamCollection As UniParameterCollection = myCommand.Parameters
Dim myParm As Object = New UniParameter("DeptNo", UniDbType.Integer)
Dim pIndex As Integer = myParamCollection.Add(myParm)
End Sub