473,772 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1055
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.co m> wrote in message
news:lb******** *************** *********@4ax.c om...
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
3916
by: My Deja | last post by:
I need examples of stored procedures returning datasets. Can anyone point me to some examples?
5
2142
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 as I know, DB2 stored procedures cannot do terminal I/O on any operating system but I know that (Java) stored procedures in Windows/Linux/Unix can write to files and I have done this many times.
4
1600
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 led me to think that perhaps I should be using ODBC from the start. What are your thoughts and suggestions on this? Will I still be able to run stored procedures and use disconnected data sets if I use ODBC? Will there be any loss of...
2
1296
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 Datasets for what I'm doing because I can't be continually posting back to the server. Is there a way to create datasets from stored procedures? Also, I have three tables. If I use datasets that access data from all
1
1421
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 (<=1 record per staff member per day) data from different legacy systems, populated by DTS. There is an 11th table that has staff data in which is used to link the others together as many have different primary keys. After the data has been...
0
2319
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 insertions back into the database. I have created new projects using datasets that are filled by three stored procedures that are bound to the forms using a datasource. The problem is, we may be using Oracle as well as SQL Server to retrieve this...
22
2737
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 things. So, in instances where I list, for example, the latest weblogs. I list the headline of the weblog, the date and the name of the member who wrote it. Now, the name isn't just "Smith", but rather Smith's online status, his nick and his...
1
1106
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 storage in this application. When using Oracle, it is easy to group related stored procedures into packages. In SQLServer; however, I don't seem to have that option. Any opinions on a good way to group code for easy maintenance and navigation (i.e....
5
4080
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 framework to auto-generate a table adapter specifying both stored procs as Get/Fill and Update. The problem is that columns from the JOINed table seem to marked as 'read-only' so trying to update a row results in an exception. BTW, by default a...
0
9620
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10104
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9912
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.