Consider this scenario -
SP - dbo. executeMe
the code is as -
page1.cs
- function abc()
- {
- .....statements
- execdbo.executeMe
- values--
- storeresult--
- }
- function cde()
- {
- .....statements
- execdbo.executeMe
- values--
- storeresult--
- }
- function efg()
- {
- .....statements
- execdbo.executeMe
- values--
- storeresult--
- }
I have another page lets say page2.cs which has two functions which aslo executes the
- function mno()
- {
- .....statements
- execdbo.executeMe
- values--
- storeresult--
- }
- function pqr()
- {
- .....statements
- execdbo.executeMe
- values--
- storeresult--
- }
Now, how i can execute the function only once and get the values all the time.
( USE THE 1ST EXECUTED STATEMENT) all the time without invoking the sp again and again. Causing redundant sp reduces the optimization.
Solutions are welcome..