Concern with using Stored Procedure with ASP
am 26.10.2004 11:49:11 von skirkby
You'll excuse what may be an obvious question...
I have an ASP application that needs to use a stored procedure in order to
access Joined databases on SQL2000. I have found some examples of how this
can be done on MSDN, but what I can't find is how to ensure error free
operation.
From the examples I have found certain variables are stored in the server
memory using DIM statements to be used in conjunction with the Stored
procedure (for example, I have an asp calendar from which a date is chosen -
data is retrieved on the basis of this date...) As this is all occurring on
the server itself, what happens to the variables if my server receives
multiple requests within the time that query 1 has been executed ? Do they
queue somehow - if so is this automatic or do I have to concern myself with
this scenario in the code / database ?
Thanks for anyone's help
Re: Concern with using Stored Procedure with ASP
am 26.10.2004 12:52:38 von reb01501
skirkby wrote:
> You'll excuse what may be an obvious question...
>
> I have an ASP application that needs to use a stored procedure in
> order to access Joined databases on SQL2000. I have found some
> examples of how this can be done on MSDN, but what I can't find is
> how to ensure error free operation.
>
> From the examples I have found certain variables are stored in the
> server memory using DIM statements to be used in conjunction with the
> Stored procedure (for example, I have an asp calendar from which a
> date is chosen - data is retrieved on the basis of this date...) As
> this is all occurring on the server itself, what happens to the
> variables if my server receives multiple requests within the time
> that query 1 has been executed ? Do they queue somehow - if so is
> this automatic or do I have to concern myself with this scenario in
> the code / database ?
>
> Thanks for anyone's help
Your conceptual misunderstanding of what takes place on a web application
server cannot be resolved via a short email post. I suggest you pick up a
book about ASP programming (one of the Wrox books) and another about ADO
programming (Bill Vaughn and David Sceppa are good authors for this topic).
Since you are a novice, it may behoove you to bypass classic ASP and skip to
ASP.Net. The newsgroups for this newer technology all have the word "dotnet"
in their names.
In the meantime, the short answer is that each page's execution is a single
instance. The variables defined by the page exist only while the page is in
scope. This all happens automatically.
In addition, here is somethiing I've written about running stored procedures
from ASP (MSDN, by covering everything, does not really give you "best
practices"):
http://tinyurl.com/jyy0
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"