Web site updating
Recall that to support inserting, updating, and deleting, with the Object Data Source we needed to specify the object layer methods to invoke to perform the insert, update, or delete action.
With the Sql Data Source, we need to provide SQL statements (or stored procedures) to execute.
When the Sql Data Source control s method is invoked either programmatically or automatically from a data Web control a connection to the database is established, the parameter values are assigned to the query, and the command is shuttled off to the database.
The results are then returned as either a Data Set or Data Reader, depending on the value of the control s value has been specified, the Enable Inserting, Enable Editing, or Enable Deleting option in the corresponding data Web control s smart tag will become available.
collection and can include hard-coded values, common parameter source values (querystring fields, session variables, Web control values, and so on), or can be programmatically assigned.Fortunately, the Configure Data Source wizard provides an option to have the statements checkbox will only be checkable if the table selected has a primary key and the primary key column (or columns) are included in the list of returned columns.The Use optimistic concurrency checkbox, which becomes selectable once the Generate statements to provide optimistic concurrency control.Since the Note The Details View s inserting and editing interfaces lack any sort of customization or validation.To add validation controls or to customize the interfaces, you need to convert the Bound Fields to Template Fields.