-
adNumeric bug in stored procedure?
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="VBSCRIPT" %>
<HTML>
<HEAD>
<TITLE>StoredProcedure1</TITLE>
</HEAD>
<!--#include file="ADOVBS.INC"-->
<BODY>
<%
Set cn = Server.CreateObject("ADODB.Connection"
cn.Open "SysDSN", "userid", "pw"
Set cmd = Server.CreateObject("ADODB.Command"
Set cmd.ActiveConnection = cn
cmd.CommandText = "StoredProcedure1"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Append cmd.CreateParameter("RetVal", adInteger,adParamReturnValue)
cmd.Parameters.Append cmd.CreateParameter("Param1", adInteger,adParamInput)
cmd("Param1" = 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("Param1", adInteger,adParamInput)
is changed to
cmd.Parameters.Append cmd.CreateParameter("Param1", adNumeric,adParamInput)
an error occurs.
Can anybody help out?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|