views:

29

answers:

2

Hi everyone! I have to develop one program that consists Data manipulation (Retrieve data, Update Data and New insert data) to multiple tables. Which will be suitable approach and faster in performance using DataSet Object and Storeprocedure with CURSOR object? Please point me out. Thanks you all!

+1  A: 

Data manipulation is typically faster when done in the DB in the stored procedure.

Unless there is a reason you have to do the manipulation within the application, do it on the DB itself.

astander
Thanks alot astander! My condition is I have IDs in list Control and I have to iterate those IDs to update some tables and insert new record to some tables. How is it? In that condition, should I use stored procedure approach? or which approach is more suitable?
RedsDevils
Itereating and hitting the DB per entry will be slower than 1 round trip. If you can build a list and pass that to the db, and make changes in such a fashion it should me quicker.
astander
+1  A: 

I sugget to go for ORM aproach like Entety Framework , LINQ to SQL or Nhibernate you both get better performance and greater development speed.

MichaelT
Thanks for your Suggestion! I will try to implement it. Can you show me a sample code or site link to implement Entety Framework , LINQ to SQL.
RedsDevils
Try this one http://weblogs.asp.net/scottgu/archive/2007/09/07/linq-to-sql-part-9-using-a-custom-linq-expression-with-the-lt-asp-linqdatasource-gt-control.aspx
MichaelT
Thanks MichaeIT !
RedsDevils