Updating is not supported by objectdatasource
For example, my existing DAL library created a whole internal dataset for every table and every relationship in the database, rather than just for the specific table required. I will use Adventure Work's Department table as our database source, and we will create a cut-down DAL class that represents this table.
While great for a Win Forms application with cached data, this design was too bulky for ODS. To do this we need to store the class in our project in the special Application Code directory (or Code for Express edition), in The most important thing to note about this function is that it is Static (for C also, shared if you use VB) ODS requires your object retrieval command to be shared so it can see the command without having to create an instance of the object first.
One of the best new features of the forthcoming ASP. However, as I found out in my experimentation what seems like a simple control has some complex behaviors to master to get it working properly.
I found lots of brief articles on the web about Object Data Source (ODS) but very few covered any detail, with no complete examples and many articles "cheated" by not using business objects, but by using datasets and data readers.
If you use ODS to display a database record on the page, ODS calls your 'Select' function to create the object, reads the properties from that object for the data-bound control, and then disposes of it before the page has completed.
So complex DAL objects which take a lot of time to set up are likely to need some thought or redesign before being used in an Object Data Source.
Once you have done that it is simple to configure controls using wizard of this controls.
In our case we will get only Department class in the dropdown list of dialog box. You will get the same dialog box with tabbed control labeled Select, Update, Insert, Delete.
ODS (as I shall call it) is a non-display control in ASP.
I set the Update Method to: Update All Comments(String sim Comment, String buy Comment, String sel Comment, String sim ID), returns Status Enum This method in SIM BLL calls the Update SIM in Data Set and the Update BUY (in BUY BLL class) and Update SEL (in SEL BLL class).
When I click on Update link, I get this error: Error: Sys. Page Request Maption: Updating is not supported by Object Data Source 'Object Data Source2' unless the Update Method is specified. Hi, use following link details regarding formview.
In later examples we will build a collection of employees for use in controls such as Data Grid View. In this page we will use another cool new data bound control from ASP. This creates a bindable form from your data object, with the capabilities for editing, insertion and deletion of data. The design pops up the new Smart Tasks pane for the control on the right, which is great because we want to create a new Object Data Source and link it to this Details View.
Other way to do this is to drag details view control and object data source control from data tab of toolbox on to