Hi,
I have written an oracle procedure which has been succesfully compiled in Toad. When I try to run the procedure from vb.net, it is returning DBNull value in place of 'Out' parameter. Below is my code.
Dim oraclecommand AsNew OracleClient.OracleCommand("INB.SPROCSTATEDTLS", con)
oraclecommand.CommandType = CommandType.StoredProcedure
oraclecommand.Parameters.Add("IC_CODE", OracleClient.OracleType.Number).Value = 1
oraclecommand.Parameters.Add("IC_CATEGORY", OracleClient.OracleType.VarChar).Value = "'ST'"
oraclecommand.Parameters.Add("C_CODE1", OracleClient.OracleType.VarChar, 100).Direction = ParameterDirection.Output
oraclecommand.ExecuteNonQuery()
ccodelist = oraclecommand.Parameters(2).Value
I am receiving DBNull in the last line.
Please advise.
Thanks.
I have written an oracle procedure which has been succesfully compiled in Toad. When I try to run the procedure from vb.net, it is returning DBNull value in place of 'Out' parameter. Below is my code.
Dim oraclecommand AsNew OracleClient.OracleCommand("INB.SPROCSTATEDTLS", con)
oraclecommand.CommandType = CommandType.StoredProcedure
oraclecommand.Parameters.Add("IC_CODE", OracleClient.OracleType.Number).Value = 1
oraclecommand.Parameters.Add("IC_CATEGORY", OracleClient.OracleType.VarChar).Value = "'ST'"
oraclecommand.Parameters.Add("C_CODE1", OracleClient.OracleType.VarChar, 100).Direction = ParameterDirection.Output
oraclecommand.ExecuteNonQuery()
ccodelist = oraclecommand.Parameters(2).Value
I am receiving DBNull in the last line.
Please advise.
Thanks.