Updating dataset asp net
Each Sql Data Adapter object has four command properties (Select Command, Update Command, Insert Command, and Delete Command), each of which takes an object ...
Bind variables are placeholders inside a SQL statement.
So far in this chapter, you have seen how to update a database and how to add transactions to ensure data integrity.
All of that is fine as far as it goes, but nothing you’ve done so far to update the database takes advantage of the Data Set object, which you will remember is the keystone of ADO. If you are using the Data Set object to retrieve data and pass it from tier to tier within your application, you would also like to manipulate that data within the dataset and push the changes back to the database.
Using bind variables also improves query performance in the database, eliminates the need for special handling of literal quotation marks in the input, and protects against SQL injection attacks.
There are three other properties including Update Command, Add Command and Delete Command.
All these commands would make changes in the database.
However, by using Command Builder Object, you don At have to create all the available commands.
The update, Add and Delete commands are created automatically based on Select Command.