I'm totally stumped with the following problem:

My sample stored procedure is as follows:

Create Procedure StoredProcedure1
(
@inp1 NUMERIC = 0
)
As
set nocount on
DECLARE @ret INTEGER
SELECT @ret = @inp1 * 2
return @ret

My ASP code to access this stored procedure is as follows:

<%@ LANGUAGE=&#34;VBSCRIPT&#34; %>
<HTML>
<HEAD>
<TITLE>StoredProcedure1</TITLE>
</HEAD>
<!--#include file=&#34;ADOVBS.INC&#34;-->
<BODY>
<%
Set cn = Server.CreateObject(&#34;ADODB.Connection&#34
cn.Open &#34;SysDSN&#34;, &#34;userid&#34;, &#34;pw&#34;
Set cmd = Server.CreateObject(&#34;ADODB.Command&#34
Set cmd.ActiveConnection = cn
cmd.CommandText = &#34;StoredProcedure1&#34;
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Append cmd.CreateParameter(&#34;RetVal&#34;, adInteger,adParamReturnValue)
cmd.Parameters.Append cmd.CreateParameter(&#34;Param1&#34;, adInteger,adParamInput)
cmd(&#34;Param1&#34 = 22
cmd.Execute
%>
ReturnValue = <% Response.Write cmd(0) %><P>
</BODY>
</HTML>

When I run this script, it works just fine. However, when the line:

cmd.Parameters.Append cmd.CreateParameter(&#34;Param1&#34;, adInteger,adParamInput)

is changed to

cmd.Parameters.Append cmd.CreateParameter(&#34;Param1&#34;, adNumeric,adParamInput)

an error occurs.

Can anybody help out?