469,275 Members | 1,287 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

Advice needed : stored procedures or datasets?

Hello,

I'm working on a project in which i use Sql Server stored procedures
to add and modify the records of our customers. This works fine, but
when writing these stored procedures, i must use a lot of parameters
(around 20) to add or modify a customer. It's long to write but i can
deal with that.

However, i was wondering if it is really efficient. In this case are
stored procedures with many parameters better than using a dataset to
add/modify a record?

Also, i was wondering what is the best solution to bind data to a
control. In my project i use SqlDataReader objects that i load with a
stored procedure, then i bind the data to the control with the
DataReader. Is this the best solution?

Thanks for any tips!
Nov 17 '05 #1
1 927
Stored Procedures are the way to go 95% of the time. They are precompiled
and very efficient.
If you drag a DataAdapter control onto a web form (from your toolbox) then
there is a nice wizard that pops up that will take care of writing most of
the monotonous parameter code for you.

When you just want to quickly fill a control with read-only data then
DataReaders are the most efficient way to do this. If you want to get much
fancier than that then the advanced features of DataSets start to make them
more appealing than DataReaders.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Matt" <me***@rocks.com> wrote in message
news:lb********************************@4ax.com...
Hello,

I'm working on a project in which i use Sql Server stored procedures
to add and modify the records of our customers. This works fine, but
when writing these stored procedures, i must use a lot of parameters
(around 20) to add or modify a customer. It's long to write but i can
deal with that.

However, i was wondering if it is really efficient. In this case are
stored procedures with many parameters better than using a dataset to
add/modify a record?

Also, i was wondering what is the best solution to bind data to a
control. In my project i use SqlDataReader objects that i load with a
stored procedure, then i bind the data to the control with the
DataReader. Is this the best solution?

Thanks for any tips!

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Rhino | last post: by
4 posts views Thread by Me | last post: by
2 posts views Thread by Sandy | last post: by
1 post views Thread by C4rtm4N | last post: by
22 posts views Thread by Sandman | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.