473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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 1028
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: My Deja | last post by:
I need examples of stored procedures returning datasets. Can anyone point me to some examples?
5
by: Rhino | last post by:
This question relates to DB2 Version 6 on OS/390. Can a (COBOL) stored procedure on this platform do file I/O, i.e. write to a sequential file? I am trying to debug a stored procedure. As far...
4
by: Me | last post by:
I am writing a C#.NET application that is primarily intended to be used with SQL server. One of my concerns is that in the future I will have users who do not have or want to run SQL Server. That...
2
by: Sandy | last post by:
Hello - I am used to retrieving data with stored procedures. DataSets have me baffled inasmuch as it exposes Sql statements directly in the code, however, I think I need to be working with...
1
by: C4rtm4N | last post by:
I'm about to embark on re-writing a database & bespoke web reporting application for our call centre & would like a little advice please. Currently the database has 10 tables containing summaried...
0
by: ccorbett | last post by:
Hi, I am pretty new to microsoft programming environment. I want to create forms in visual basic 2005 studio that read data from stored procedures and load into the forms for editing and new...
22
by: Sandman | last post by:
So, I have this content management system I've developed myself. The system has a solid community part where members can register and then participate in forums, write weblogs and a ton of other...
1
by: rw2007 | last post by:
I am preparing to upgrade a fairly large application, so I'm looking for some advice before I begin my design. I have quite a bit of experience in Oracle, but I am required to use SQLServer for data...
5
by: Bogdan | last post by:
Hi, I have a stored procedure that uses JOINs to return columns from multiple tables. I also have another stored proc that that takes a series of params and updates multiple tables. I used the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.