Dataset or datasource control?

J

Jason James

Hi all,

Having moved from dotnet V1.1 to V2 I am having some difficulty
understanding the new data access methods that seem to be preferred.
In V1.1 the dataset did everything that I needed, and now it seems that
the preferrence is the datasource control! aaarrrrgggg!

I have followed several example of how to manage the modification and
deletion of data from a gridview on as asp.net page and I have to say I
am impressed with its simplicity, however, can anyone point be to a
post or other online article that has the details of how to do this
using a dataset instead of a datasource?

I can bind my dataset to the gridview, but the entire edit/delete
functionality has gone. What am I missing?

Many thanks,

Jason
 
N

Neutrino

Hi Jason,

The topic is broad, but here is a little hint: you can bind a Dataset
to an ObjectDataSource. What I am not sure at this moment is if it must
be a typed dataset, I think so. There might be other ways to go, but
this should work.

In terms of the recommended best practices, arquitecture or paterns,
let me tell you that after months of working with ASP 2.0 I have found
that there is many many ways to go - there isn't yet a "main"
arquitecture. You may want to look at the Start Kit's in the ASP.NET
web site to gather some ideas and select what is best for your
application.

Good luck!
Good luck.
 
S

sloan

I would concur the "bind strongly typed dataset to the ObjectDataSource".

After a few experimentations, it worked best for me.

My main reason is that:

You need to bind GridViews to a SqlDataSource or ObjectDataSource.
N-tiered answers the question (for me) about whether to use the
SqlDataSource or the ObjectDataSource (object being the "winner").

My project runs a query to get 1000+ rows. But after the user gets that
data, they sort,page on it for several reps...before going onto another
(new) query.

Thus I populate the strongly typed DS , cache it. and bind it to the
ObjectDataSource as the user navigates the GridView.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top