C
C#8mo ago
midasik

✅ System.IndexOutOfRangeException

I tried to insert some rows from my Database and when I run and check in the Form it tells me this: "System.IndexOutOfRangeException" here is the part where the error is present: dataGridView1.Rows.Add(reader["customer_name"].ToString(), reader["order_date"].ToString(), reader["total_amount"].ToString(), reader["product_name"].ToString());
2 Replies
prince
prince8mo ago
hello i recommend storing into variables before putting into the add function string customer name = reader.... @midas
midasik
midasikOP8mo ago
thanks, but I found how to solve the problem so far
Want results from more Discord servers?
Add your server