I have the following code that executes a stored procedure and the parameter @customer is in the database as a varchar. Can anyone tell me why im getting the above stated error in this code. Thanks in advance.
SqlConnection conn = new SqlConnection("Data Source=server1;Initial Catalog=estimator;Integrated Security=True");
SqlCommand cmd = new SqlCommand("QuoteCreate", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@estnum", estno);
cmd.Parameters.AddWithValue("@quotenum", SqlDbType.Int).Direction = ParameterDirection.Output;
cmd.Parameters.AddWithValue("@customer", SqlDbType.VarChar).Direction = ParameterDirection.Output;
cmd.Parameters.AddWithValue("@stdrfq", SqlDbType.Int).Direction = ParameterDirection.Output;
SqlConnection conn = new SqlConnection("Data Source=server1;Initial Catalog=estimator;Integrated Security=True");
SqlCommand cmd = new SqlCommand("QuoteCreate", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@estnum", estno);
cmd.Parameters.AddWithValue("@quotenum", SqlDbType.Int).Direction = ParameterDirection.Output;
cmd.Parameters.AddWithValue("@customer", SqlDbType.VarChar).Direction = ParameterDirection.Output;
cmd.Parameters.AddWithValue("@stdrfq", SqlDbType.Int).Direction = ParameterDirection.Output;