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.
|