Supplying Parameters to Commands In the examples you've seen up to this point, the values for each column have been hardcoded in the SQL statements. | Supplying Parameters to Commands In the examples you ve seen up to this point the values for each column have been hardcoded in the SQL statements. For example in Listing shown earlier the INSERT statement that added the row to the Customers table was INSERT INTO Customers CustomerlD CompanyName VALUES J3COM Jason Price Corporation As you can see the values for the CustomerID and CompanyName columns are hardcoded to J3COM and Jason Price Corporation . If you had to execute many such INSERT statements hard-coding column values would be tiresome and inefficient. Fortunately you can use parameters to solve this problem. Parameters allow you specify different column values when running your program. To execute a command containing parameters you use the following high-level steps 1. Create a Command object containing a SQL statement with parameter placeholders. These placeholders mark the position where a parameter will be supplied. 2. Add parameters to the Command object. 3. Set the parameters to specified values. 4. Execute the command. Let s take a look at the details of the four steps when using parameters with SQL Server. Step 1 Create a Command Object Containing a SQL Statement with Parameter Placeholders This is straightforward wherever you would normally place a column value in your SQL statement you specify a parameter placeholder instead. A placeholder marks the position where a value will be supplied later. The syntax you use for the placeholders depends on the database you are using. With SQL Server example placeholders would be @CustomerID and @CompanyName. The following INSERT statement uses these placeholders for the CustomerID CompanyName and ContactName column values of the Customers table INSERT INTO Customers CustomerlD CompanyName ContactName VALUES @CustomerID @CompanyName @ContactName You can use a placeholder anywhere a column value is valid in a SELECT INSERT UPDATE or DELETE statement. Here are some examples of SELECT UPDATE and DELETE .