public void CreateOleDbParamColl ( OleDbConnection myConn ) {
OleDbCommand myCommand = new OleDbCommand (
"SELECT * FROM Customers WHERE CustomerID = ?", myConn );
OleDbParameterCollection myParams = myCommand.Parameters;
OleDbParameter myParam = myParams.Add ( new OleDbParameter (
"CustomerID", OleDbType.VarChar, 5, "CustomerID" ) );
}
Public Sub CreateOleDbParamColl ( myConn As OleDbConnection )
Dim myCommand As New OleDbCommand ( _
"SELECT * FROM Customers WHERE CustomerID = ?", myConn )
Dim myParams As OleDbParameterCollection = myCommand.Parameters
Dim myParam As OleDbParameter = myParams.Add ( New OleDbParameter ( _
"CustomerID", OleDbType.VarChar, 5, "CustomerID" ) )
End Sub |