I am trying to call a DB2 stored procedure using Vb.Net. Actually I have been trying to migrate an old ASP app to .Net and the procedure works fine in ASP.

Here's a part of the old code:
oCmd.Prepared = true
Set oParam = oCmd.CreateParameter("RETURN", adsmallInt, 3, 2, 0)
oParam.Precision = 4
oParam.NumericScale = 0
oCmd.Parameters.Append oParam
ExecuteCmd oCmd
oRsReturn = oCmd.Parameters

And this is my new code:
Dim oParam as OdbcParameter = oCmd.CreateParamter()
oParam.ParameterName = "RETURN"
oParam.OdbcType = OdbcType.SmallInt
oParam.Direction = Direction.InputOutput
oParam.Size = 2
oParam.Value = 0

I get this error:
ERROR[42601][IBM][CLI DRIVER][DB2]SQL010N An unexpected token "<End-Of-Statement>" was found following "". Expected tokens include: "<Identifier>" SQLSTATE = 42601

Another Question: I am using Queryman to connect to my DB2's DSNT and how would I call my stored procedure from that?

Thank you so much for reading!