"anoop" wrote:
I have a stored procedure named as
usp_CheckLogin with two parameters
as @usID, @Password
also values of these parameters are to be extracted using Request.Form
from
the fields in the forms. Now How do I call this stored procedure from an
ASP
Page using a Connection object in Server Tags <% %>.
Take a look at the final section here, titled "Execute a stored procedure as
a native method of a Connection object". Your problem seems well-suited for
this approach:
http://msdn.microsoft.com/library/en...connection.asp
In other words, you can use an open connection like this:
objConn.usp_Che ckLogin strUserID, strPassword
Also this stored procedure returns a Numeric value as
"RETURN_VAL UE". please give me the syntax. This stored
Procedure is a part of Session Management module.
Returns? Would that be with a RETURN statement or a SELECT statement? The
answers are quite different.
If your procedure ends with...
SELECT xxx AS RETURN_VALUE
....then you can simply append a parameter and stick a recordset object
there...
objConn.usp_Che ckLogin strUserID, strPassword, objRS
....and read from the recordset as usual:
If objRS.Fields("R ETURN_VALUE").V alue = {whatever} Then
If, on the other hand, your procedure uses RETURN, you may have to use an
explicit command object:
http://msdn.microsoft.com/library/en...objcommand.asp
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.