Datasets in framework 2.0

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello,

In ASP.NET 1.1, I followed this data access methodology:

At design time
- Create a strongly typed dataset
- Add this dataset to a form and bind controls to the dataset using
the designer

At run time
- Fill dataset with data on the first load of the page
- Handle all Add/Edit/Delete operations against the in-memory copy
of my dataset
- Persist the dataset between postbacks in session
- Give users the ability to Save or Cancel changes, which either
persists the changes to the database or discards them.

It worked like a charm -- there were only two trips to the database --
in the very beginning and at the very end. In memory manipulations were
very fast. And, more importantly, my productivity was high because I
was able to use design features of the Visual Studio.

It seems that in 2005, if I were to pursue the same methodology, things
would be harder, not easier.

- It appears that the only way to bind a dataset to a gridview is
through the ObjectDataSource. This binds to data adapters, not the
actual dataset, so, the database gets hit on each update.

- DataSource property is gone from the design view, so I no longer can
use the design features of Visual Studio, if I were to directly bind to
a dataset.

- There is no out of the box feature to persist a dataset between
postbacks. So, like in 1.1, if I were to go this route, I would have to
persist it in session.

I was wondering if there is anybody out there who used the 1.1 data
access in a similar fashion, and how you adapted to 2.0.

Thank you for your comments.

Evgueni

.



Relevant Pages

  • Re: Persisting programmatically changed (set) property.
    ... he has to select CurrentState property from the list of the ... And this is what I meant by "set up programmatically" at design time. ... The value persists ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Re: bind hack?
    ... He writes BIND 9. ... rfcs as documentation and therefor basis for design it is a shitload ... dns server software developed, tested and finally deployed. ... security dilemma since this monoculture defines the standard. ...
    (FreeBSD-Security)
  • Re: Datasets in framework 2.0
    ... Microsoft provides a rich design experience to ... control over data access, things got a little more complicated. ... Add this dataset to a form and bind controls to the dataset using ... persists the changes to the database or discards them. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Checkbox in forms
    ... To bind check box to a field: ... Open your form in design view. ... In the Properties sheet, on the Data tab, set the Control Source property to the name of the field where you want this data stored. ... "Yes/No" it shows as a checkbox in the table itself. ...
    (microsoft.public.access.forms)
  • Re: Rene cant handle AoAs Success
    ... design, some day. ... Since the days of FORTRAN (that's pre-1956, btw), ... we've known how to bind different attributes to a name appearing in a ...
    (alt.lang.asm)