Advice needed : stored procedures or datasets?

M

Matt

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!
 
S

Steve C. Orr, MCSD

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.
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top