Can I get a little help with my insert statement. This is going to MYSQL. PageNumber and SlotPosition are both (int) which is why I think its failing.
But if I do
+ Convert.ToInt32(dataGridView2.Rows[i].Cells["PageNumber"].Value) + "','"
the other fields become Null.
String cmdText = "INSERT INTO merchantitem (MerchantItem_ID, ItemListID, ItemTemplateID, PageNumber, SlotPosition) VALUES ('"
+ dataGridView2.Rows[i].Cells["MerchantItem_ID"].Value + "','"
+ dataGridView2.Rows[i].Cells["ItemListID"].Value + "','"
+ dataGridView2.Rows[i].Cells["ItemTemplateID"].Value + "','"
+ dataGridView2.Rows[i].Cells["PageNumber"].Value + "','"
+ dataGridView2.Rows[i].Cells["SlotPosition"].Value + "')";
MySqlCommand cmd = new MySqlCommand(cmdText, constr);
cmd.ExecuteNonQuery();