Add(String,UniDbType,Int32) Method
Adds a
UniParameter to the
UniParameterCollection given the the parameter name, data type, and column width.
The following example creates a
UniParameterCollection, adds instances of
UniParameter to the collection, and returns a reference to the new
UniParameter.
|
|---|
public void CreateUniParamColl(UniConnection myConn) {
UniCommand myCommand = new UniCommand("SELECT * FROM Test.Dept WHERE DeptNo = :DeptNo", myConn);
UniParameterCollection myParamCollection = myCommand.Parameters;
UniParameter myNewParameter = myParamCollection.Add("DeptNo", UniDbType.Integer, 40);
} |
|
|---|
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 myNewParameter As UniParameter = myParamCollection.Add("DeptNo", UniDbType.Integer, 40)
End Sub |