Objectdatasource updating input parameters

We've bound an Object Data Source to a class whose "select" returns a custom object.

We point the "update" to a method which accepts the same kind of object as an input parameter.

This article (part two) continues where the previous article stopped: it shows you how to code the classes that were designed in part one.

You'll see how to implement the data access methods and database code and you'll learn how you can connect these classes.

For example, if these parameters are part of the SELECT command then add them to the Selecting event, if they need to go with the UPDATE command then add them on the Updating event.

The following table provides the properties of the Data Source View class: The Sql Data Source control represents a connection to a relational database such as SQL Server or Oracle database, or data accessible through OLEDB or Open Database Connectivity (ODBC).

Connection to data is made through two important properties Connection String and Provider Name.

The following code snippet provides the basic syntax of the control: Configuring various data operations on the underlying data depends upon the various properties (property groups) of the data source control.

Adding that not only makes the Drop Down List start at the previous value, it also makes the whole parameter passing thing work correctly.

Add them to the event for the operation you are trying to use.

Objectdatasource updating input parameters