Click to See Complete Forum and Search --> : When do i use the SqlDataSource and when to use dataset?


asafaa
October 27th, 2008, 03:39 AM
When do i use the SqlDataSource and when to use datasets?

they both perform select,delete, etc...

so which one is better ?
and if it depends on my needs in the project , then which is better for each situation ?

sraheem
October 29th, 2008, 09:55 AM
Datasets are always better and maintained in memory to reuse. SQLDataSource is maintained at page level making it a two-tier object. If you are making a small application this should be fine though.

asafaa
October 31st, 2008, 12:34 AM
thank you ,

does anyone have more information on the subject ?

eclipsed4utoo
October 31st, 2008, 07:39 AM
personally, I don't like using SqlDataSources to bind to controls. I actually try to stay away from binding any type of data source to a control through the designer. I feel that I have more control over DataSets(and DataTables) than I do over SQLDataSources.

asafaa
October 31st, 2008, 08:31 AM
Thank you.

toraj58
November 5th, 2008, 07:57 AM
in my opinion both of them has their own usage. you use dataset to implement Disconnected Data access and you should write code to make something work.but you can implement some functionality using SQLDataSources without even writing a bit of code.

Touraj Ebrahimi [toraj_e] [at] [yahoo] [dot] [com]