T
tshad
I am calling a stored procedure which I know is returning 0, but my code
shows it as null.
What am I missing?
*************************************
SqlCommand dbCommand = new SqlCommand("Add",
new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectString"].ConnectionString));
dbCommand.CommandType = CommandType.StoredProcedure;
dbCommand.Parameters.AddWithValue("@CALLS",
Convert.ToInt32(((Label)gvr.FindControl("lblGiftCount")).Text));
retValue = dbCommand.Parameters.Add("RetValue", SqlDbType.Int);
retValue.Direction = ParameterDirection.ReturnValue;
dbCommand.Connection.Open();
dbReader = dbCommand.ExecuteReader(CommandBehavior.CloseConnection);
*************************************
After the ExecureRead, retValue.Value = null????
Thanks,
Tom
shows it as null.
What am I missing?
*************************************
SqlCommand dbCommand = new SqlCommand("Add",
new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectString"].ConnectionString));
dbCommand.CommandType = CommandType.StoredProcedure;
dbCommand.Parameters.AddWithValue("@CALLS",
Convert.ToInt32(((Label)gvr.FindControl("lblGiftCount")).Text));
retValue = dbCommand.Parameters.Add("RetValue", SqlDbType.Int);
retValue.Direction = ParameterDirection.ReturnValue;
dbCommand.Connection.Open();
dbReader = dbCommand.ExecuteReader(CommandBehavior.CloseConnection);
*************************************
After the ExecureRead, retValue.Value = null????
Thanks,
Tom