Creating a command object in Microsoft SQL-Server
- To add a command object, right-click the Data Environment in the Project Explorer window.
- Now select “Add Data Command” from the menu.
- The Command Properties Dialog is now displayed. First, assign a name to the command object. Name it BookRecordsComd. The command object will use the connection vbookconn. It is already selected in the connection box since it is the only connection currently in the project.
You also have to specify the Database Object that you want to use. You do this by pulling down the Database Object list box. Click the down arrow to the right of Stored Procedure in the Database Object text box.
- This command object will contain the records in the book table, so select BookTable in the Object Name list box.
- Those are all the properties that need to be set. Click OK to continue.
- Now, the command object BookRecordsCmd is shown in the Project Explorer under vbookconn. This is the end of the simulation.