473,396 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ObjectDataSource - missed the mark ?

I started looking into the ObjectDataSource and I really like it.
It does seem to me though that they really missed the mark in one respect -

The designers went through the trouble to allow the use of
DataObjectTypeName to have custom objects passed to your dal methods.
So why did they then turn around and have
ConflictDetection="CompareAllValues" cause the old field values to be passed
as individual arguments instead of following through with the OO theme and
simply pass in a second object that contains the old values. This strikes
me as extremely inconsistent not to mention a pain in the maintenance ass.

ie instead of DAL.Update(CustomObject,original_ID , original_Name ,
original_Age , original_Fielda , original_Fieldb, original_Fieldc,
original_Fieldd, original_Fielde , ...)
why not DAL.Update(CustomObject , OldCustomObject ) ?

Am I missing something - is this behaviour available through the
ObjectDataSource ?
Is there a way to derive a custom ObjectDataSource to provide this behaviour
?
Does anyone know if the ObjectDataSource source is available to add this
behaviour ?

Gerry



Feb 21 '07 #1
1 1155
ok - I found it.

after much futsing around and reminding myself to compeletely ignore all
documentation I determined that OldValuesParametersFormatString contains the
name for the OldValues object passed into the update method call and does
not actually do any formatting at all. Why this name is required I am not
sure - i guess it was too simple to decide that the update method takes 2
objects , the 1st is the new values and the second is the old values.

Gerry

"gerry" <ge**@canada.comwrote in message
news:uv**************@TK2MSFTNGP04.phx.gbl...
>I started looking into the ObjectDataSource and I really like it.
It does seem to me though that they really missed the mark in one
respect -

The designers went through the trouble to allow the use of
DataObjectTypeName to have custom objects passed to your dal methods.
So why did they then turn around and have
ConflictDetection="CompareAllValues" cause the old field values to be
passed as individual arguments instead of following through with the OO
theme and simply pass in a second object that contains the old values.
This strikes me as extremely inconsistent not to mention a pain in the
maintenance ass.

ie instead of DAL.Update(CustomObject,original_ID , original_Name ,
original_Age , original_Fielda , original_Fieldb, original_Fieldc,
original_Fieldd, original_Fielde , ...)
why not DAL.Update(CustomObject , OldCustomObject ) ?

Am I missing something - is this behaviour available through the
ObjectDataSource ?
Is there a way to derive a custom ObjectDataSource to provide this
behaviour ?
Does anyone know if the ObjectDataSource source is available to add this
behaviour ?

Gerry



Feb 21 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press...
3
by: avezina | last post by:
We would like to use those new cool features of Asp.Net 2.0 like the ObjectDataSource in our project. I tried few basics examples and its work well. Let's say I have a page that displays a...
2
by: J055 | last post by:
Hi I've implemented caching for my ObjectDataSource. <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" EnableCaching="True" CacheDuration="10" CacheExpirationPolicy="Sliding" ...
1
by: Dabbler | last post by:
I have a FormView tied to ObjectDataSource that's not updating and am wondering what I missed.. <asp:FormView ID="fvRegDetail" runat="server" DefaultMode="Edit" DataKeyNames="RegistrantId"...
0
by: Northern | last post by:
Hello, I have some trouble to declare and instantiate dynamically an ObjectDataSource in the codebehind file. The idea is to bind the objectdatasource to a gridview and have automate sorting and...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
5
by: Randy Smith | last post by:
Hi ALL, I wonder if anyone has been using n-tier to bind to a GridView control by using the ObjectDataSource. This is our first OOP web application, and we have no tables. Right now we are...
2
by: Jonathan Wood | last post by:
I have a page with a GridView, which uses an ObjectDataSource control to obtain the data. The ObjectDataSource control calls a static method on a class I've created. However, this method needs...
3
by: Tides | last post by:
My new page just won't fire the Update, Insert or Delete function on the BLL. I'm newish to ASP.NET and this may be a simple thing I have forgotten, but its driving me up the wall. I have other...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.