The statements or stored procedures in these commands can be defined with parameter placeholders.
If you are using an OleDbDataAdapter object, a statement uses a question mark as a placeholder and might look like this:
Select * From Customers Where City = ?
If you are using a SqlDataAdapter object, a statement that uses named parameters might look like this:
Select * From Customers Where City = @City
If you are using an OracleDataAdapter object, a statement that uses Oracle named parameters might look like this:
SELECT * FROM Customers WHERE CustomerID = :pCustomerID
Note: |
|---|
For Oracle, when using named parameters in an SQL statement or stored procedure, you must precede the parameter name with a colon (:). However, when referring to a named parameter elsewhere in your code (for example, when calling the
Add method), do not precede the named parameter with a colon (:). The data provider supplies the colon automatically.
|