I've to query some tables on SQL Server using ASP. I've to join these tables in the query. Will the response time be faster if I make a stored procedure for the query and let the ASP to execute the stored proc? Thanks! Please visit my WebCam!!
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Set rs=Server.CreateObject("ADODB.Recordset")
Set cmd=Server.CreateObject("ADODB.Command")
cmd.ActiveConnection=connectionVariable
cmd.CommandType=adCMDStoredProc
cmd.CommandText="cp_Ad_EntityInfo"
Set paraID = cmd.CreateParameter("id",adVarChar,adParamInput,40,EnID)
cmd.Parameters.Append paraID
Set rs=cmd.Execute()
If Err<>0 then
Response.Write(Err.description)
Response.End
end if
CREATE PROCEDURE sp_StoredProcedure
@ID varchar(40)
AS
SELECT * FROM Table
WHERE ID = @ID