Add(String,SQLiteType) Method
Adds a
SQLiteParameter to the
SQLiteParameterCollection given the parameter name and data type.
The following example creates a
SQLiteParameterCollection, adds instances of
SQLiteParameter to the collection, and returns a reference to the new
SQLiteParameter.
|
|---|
public void CreateSQLiteParamColl(SQLiteConnection myConn) {
SQLiteCommand sqCommand = new SQLiteCommand("SELECT * FROM Dept WHERE DeptNo = :DeptNo", myConn);
SQLiteParameterCollection myParamCollection = sqCommand.Parameters;
object myParm = new SQLiteParameter("DeptNo", SQLiteType.Int32);
int pIndex = myParamCollection.Add(myParm);
} |
|
|---|
Public Sub CreateSQLiteParamColl(myConn As SQLiteConnection)
Dim sqCommand As SQLiteCommand = New SQLiteCommand("SELECT * FROM Dept WHERE DeptNo = :DeptNo", myConn)
Dim myParamCollection As SQLiteParameterCollection = sqCommand.Parameters
Dim myParm As Object = New SQLiteParameter("DeptNo", SQLiteType.Int32)
Dim pIndex As Integer = myParamCollection.Add(myParm)
End Sub |