Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Ok to have multiple Stored Procedures on one page?

Author  Topic 

monaya
Yak Posting Veteran

58 Posts

Posted - 2009-01-28 : 23:24:52
I'm very new to T-SQL so i don't know if I'm correct, but I'm finding that its hard to pull all the records I want from one stored procedure.

Is it normal to have 2-3 stored procedures running on one page?

I need to collect data from a user that returns a single record but I also need to collect data for the user that's stored in another table that brings back multiple records which I need to also join 2 more tables for.

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-28 : 23:31:36
It is ok and that architecture called as "Nested Stored procedures". but keep that in mind in order to get the maximun results with minimum errors you do have to place those SPs at the relavant place..

Avantha Siriwardana
Go to Top of Page

monaya
Yak Posting Veteran

58 Posts

Posted - 2009-01-28 : 23:44:26
These would occur when the page loads ... Still ok?
Go to Top of Page

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-28 : 23:54:48
Rather put them inside the page load method, put them in separate modules and call within the pageload.

Avantha Siriwardana
Go to Top of Page

monaya
Yak Posting Veteran

58 Posts

Posted - 2009-01-29 : 00:11:04
Sorry for my ignorance, but can you give an example by putting them in modules. You mean configured to load when the user clicks something on the page?

I need them to bring up the default information for the user without any user interaction.

quote:
Originally posted by AvanthaSiriwardana

Rather put them inside the page load method, put them in separate modules and call within the pageload.

Go to Top of Page

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-29 : 00:12:57
you mean using asp.net or something else?

Avantha Siriwardana
Go to Top of Page

monaya
Yak Posting Veteran

58 Posts

Posted - 2009-01-29 : 00:34:14
quote:
Originally posted by AvanthaSiriwardana

you mean using asp.net or something else?

Avantha Siriwardana



Yes.
Go to Top of Page

monaya
Yak Posting Veteran

58 Posts

Posted - 2009-01-29 : 00:36:29
Coldfusion
Go to Top of Page

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-29 : 00:39:41
monaya here is a pretty good link for you.
http://www.justskins.com/forums/calling-multiple-stored-procedures-inside-a-cfquery-53240.html

let me know the progress.

Avantha Siriwardana
Go to Top of Page
   

- Advertisement -