Welcome to fuzzydev Sign in | Join | Help
in Search

.Net

Date with DataSource Control - Ms. ObjectDataSource

Developer's are the most busiest guys on the earth and unfortunately I am one of them. So what do we do about it? Well, I have decided to go out on date with the five beautifull girls. Their names are listed below.

  • Ms. ObjectDataSource
  • Ms. SqlDataSource
  • Ms. AccessDataSource
  • Ms. XmlDataSource
  • Ms. SiteMapDataSource

So let me start with Ms. ObjectDataSource...

Where can we find her?

She hangs out almost everyday in the data tab of the VS IDE toolbox.

What's her nature of job?

She works for a framework called .Net 2.0 and is a thorough professional providing data for all the data bound controls. She is a very smart lady, she is aware of the fact that enterprise applications market is a multi billion dollar industry and many developers these days are part of this industry. If the application is not scalable then the industry doesn't have a chance to survive. She allows developers to use the data source controls yet have the abstraction layer intact.

How does she deliver her role?

I remember once she told me that she is been entrusted with this responsibility and going to seek help from her close friend (her name is Ms. Reflection stays in System).

Discussion about reflection is deferred until I go out on date with all the Ms. Datasource's Wink [;)] 

Well back to Ms. ObjectDataSource; she told me that Ms. Reflection have some magical powers and so she can get her details about anybody(Object) and also hypnotise anyone(Object) to perform certain actions. This was what Ms. ObjectDataSource was looking for to impress the developers like us. There are few things which she expects from us and once we provide her with those details we can introduce our data control friends to her and ask her to handover the data to them.

Sounds complicated, ok let me simplify there is a contract between Ms. ObjectDataSource(promising to fetch, insert, update, delete data) by invoking methods(hyptonising through her friend Reflection and making objects to perform certain actions). And our data control friends uses those data to display in the form they are requested to.

I have taken a couple of screen shots, this should help you to better understand her.

There are few things we need to know....

To get the data, assign the method name(the one which fetches data) of your business object to Ms. ObjectDataSource's SelectMethod.

//Example

objDSCustomers.SelectMethod = "GetCustomers";

For insert, update, delete follow the same pattern and bind objDSCustomers to the data control.

//Example

grdViewCustomers.DataSourceID = "objDSCustomers";

Although there are many things about Ms. ObjectDataSource which I haven't discussed, but with the above information I am sure now you have a better idea about her.

 

Published 10 June 2006 by sachinjoshi
Filed Under:
Anonymous comments are disabled

This Blog

Post Calendar

<June 2006>
SuMoTuWeThFrSa
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678

Sponsored Links

Syndication

Copyright 2010, Sachin Joshi. All rights reserved.
The content on this site represents my own personal opinions and thoughts at the time of posting, and does not reflect those of my employer's in any way.
Powered by Community Server, by Telligent Systems