Hello Friends !
I have the Following Code, that Executes a Stored Procedure and Attempt to
read a Returned Integer Value from the StoredProc.
But It gives Error ...
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/C4U/DBOutputParamet erTest.asp, line 25
Can some one Points Out the Problem ....
REM============ =============== =============== =============== ============
<BODY>
<%
Const adCmdStoredProc = 4
Dim objConnection, objCommand, objParameter, sSQL
Set objConnection = Server.CreateOb ject("AdoDB.Con nection")
Set objCommand = Server.CreateOb ject("AdoDB.Com mand")
Set objParameter = Server.CreateOb ject("AdoDB.Par ameter")
'Dim objParameter 'As AdoDB.Parameter
sSQL = "Execute RegisterMessage '13', 'Accounting', 'Accounts', '24304',
'Hello By Test Message', 'P', '2492331', 'VipulP: The Tester'"
objConnection.O pen Session("CONNEC TION_STRING")
Set objCommand.Acti veConnection = objConnection
objCommand.Comm andText = sSQL
objCommand.Comm andType = adCmdStoredProc
Set objParameter = objCommand.Crea teParameter("Re turn", adInteger,
adParamReturnVa lue,,0)
objCommand.Para meters.Append objParameter
Response.Write "SQL: " & sSQL & "<BR>"
'Response.End()
objCommand.Exec ute()
IF objConnection.E rrors.Count > 0 Then
Response.Write "ERROR:<P>"
Response.Write "Error # " & objConnection.E rrors(0).Number & "<BR>"
Response.Write "Error Description: " &
objConnection.E rrors(0).Descri ption & "<BR>"
Response.Write "Error Source: " & objConnection.E rrors(0).Source & "<BR>"
Else
Response.Write "Generated Message Id: " &
objCommand.Para meters.Item("Ms gId").Value & "<P>"
End IF
objCommand.Para meters.Refresh( )
For Each objParameter In objCommand.Para meters
Response.Write objParameter.Na me & ": " & objParameter.Va lue & "<BR>"
Next
%>
</BODY>
REM============ =============== =============== =============== ============
Thanks !
------------------------------
V I P U L P A T H A K
eBot Technosoft Limited,
Indore, (MP), India.
http://www.ebotsoft.com