i'm running C# on a windows application and found a problem.
I'm unable to Check if a row from my data grid contains a null value, because im populating the rows for the datagrid from a CSV file and after that i need to populate that csv file into my database.
if (da.Tables["stocks"].Rows[i].ItemArray.GetValue(0) == "null")
{
//to insert on another table or create a file to dump the info another csx
}
else
{
cmd.CommandText = "Insert into Test values('" +da.Tables["data"].Rows[i].ItemArray.GetValue(0) + "','" + da.Tables["data"].Rows[i].ItemArray.GetValue(1) + "','" + da.Tables["data"].Rows[i].ItemArray.GetValue(2) + "')";
cmd.ExecuteNonQuery();
}