عندي تنفيذ هذا الكود
else if (trxDtlDataGridView.Columns[e.ColumnIndex].DataPropertyName == "Qty")
{
MessageBox.Show("we started");
SqlConnection con = new SqlConnection();
SqlCommand cmd = new SqlCommand();
con.ConnectionString = "Data Source=PC2600;Initial Catalog=OSPalm;Integrated Security=True";
con.Open();
cmd.CommandText = "select quantity from items where itemno= "+ y;
cmd.Connection = con;
SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read())
{
MessageBox.Show(rdr.GetInt32(0).ToString());
// qtydb = rdr.GetInt32(0);
}
rdr.Close();
con.Close();
MessageBox.Show(qtydb.ToString());
}حصل هذا الخطا
when casting frpm a number value must be less than infinity
عند هذه التعليمة
messagebox.show(rdr.getint32(0));
ما هو الخطا برايكم
