OLE DB Parameters

OLE DB parameters are used to supply values to an OLE DB query. They allow you to provide data to be used in the query, such as values for variables or constants.

Key Concepts

Example

Here's a simple example of how to use OLE DB parameters:

          
            using System.Data.OleDb;

            // ... (connection and other setup) ...

            OleDbCommand cmd = new OleDbCommand("SELECT * FROM Customers WHERE City = @City", connection);
            cmd.Parameters.AddWithValue("@City", "London");
            
        

In this example, the query "SELECT * FROM Customers WHERE City = @City" uses a parameter named "@City". The value "London" is then passed to the parameter using the `AddWithValue` method.

Properties

See the Parameter Class for more details.