am using a Prepared Statement in C#.
SqlCommand inscommand = new SqlCommand(supInsert, connection);
inscommand.Parameters.Add("@ordQty", SqlDbType.Decimal,18);
inscommand.Prepare();
u = inscommand.ExecuteNonQuery();
The above code throws below Exception:
SqlCommand.Prepare method requires parameters of type ‘Decimal’ have an explicitly set Precision and Scale.
EDIT: How to avoid this Exception
The following would set a Decimal with Precision 18 and Scale 8 (Decimal (18,8))