By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,654 Members | 1,811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,654 IT Pros & Developers. It's quick & easy.

One big stored procedure?

P: n/a
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

Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.