Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > One big stored procedure?

Reply
Thread Tools

One big stored procedure?

 
 
Dominic Marsat
Guest
Posts: n/a
 
      11-01-2004
Hi,

I'm calling a series of stored procedures from ASP in the format

sqlString = "SPROC_1 @param=1 "
Conn.Execute sqlString, , 129

sqlString = "SPROC_2 @param=2 "
Conn.Execute sqlString, , 129

sqlString = "SPROC_3 @param=2 "
Conn.Execute sqlString, , 129

sqlString = "SPROC_4 @param=2 "
Conn.Execute sqlString, , 129

Permforming various UPDATEs and INSERTs on a number of different tables in
the same database.

Is it better to group all the procedures together as one big SP?

Cheers, Dominic





 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      11-01-2004
Dominic Marsat wrote:
> Hi,
>
> I'm calling a series of stored procedures from ASP in the format
>
> sqlString = "SPROC_1 @param=1 "
> Conn.Execute sqlString, , 129
>
> sqlString = "SPROC_2 @param=2 "
> Conn.Execute sqlString, , 129
>
> sqlString = "SPROC_3 @param=2 "
> Conn.Execute sqlString, , 129
>
> sqlString = "SPROC_4 @param=2 "
> Conn.Execute sqlString, , 129
>
> Permforming various UPDATEs and INSERTs on a number of different
> tables in the same database.
>
> Is it better to group all the procedures together as one big SP?
>
> Cheers, Dominic


Yes. Or at least call a single stored procedure that runs each individual
one. You are not taking advantage of one of the biggest benefits of using
stored procedures: code encapsulation. Make one call to the database instead
of 4.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf ASP .Net 0 12-26-2008 09:29 AM
GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf ASP .Net Web Controls 0 12-26-2008 06:11 AM
GIDS 2009 Java:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf Python 0 12-24-2008 07:35 AM
GIDS 2009 Java:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf Ruby 0 12-24-2008 05:07 AM
lots of little mallocs or one big one? (somewhat naive) Dave Stallard C++ 6 06-01-2007 06:30 AM



Advertisments