I'm using odbc namespace. I just experimented with the demo data where I wrote the outval into a table and that worked fine but the C# code still returns null.
snippet:
OdbcConnection conn = new OdbcConnection(ConfigurationManager.ConnectionStrings["PVSWDemoData"].ToString());
OdbcCommand cmd = new OdbcCommand("{ CALL ProcOut(?,?) }", conn);
cmd.CommandType = CommandType.StoredProcedure;
OdbcParameter par1 = cmd.Parameters.Add
("@id", OdbcType.Int);
par1.Value = 132;
OdbcParameter par = cmd.Parameters.Add
("@outval", OdbcType.Int);
par.Direction = ParameterDirection.Output;
try
{
conn.Open();
OdbcDataReader dr = cmd.ExecuteReader();
dr.Read();
if (dr.HasRows && cmd.Parameters["@outval"].Value != null)
{
bReturnValue = true;
}