hello guys good eve.
| ACCT_NO | FIRST_NAME | LAST_NAME |
200111 john wade
200112 clay suede
i can loop to all tables in row. my problem is only 200111 value is pass, written on my database. heres my sample code feel free to commend and change.
for (int i = 0; i <= dataGridView1.Rows.Count - 1; i++)
{
foreach (var cell in dataGridView1.Rows[i].Cells)
{
command.CommandText = "INSERT INTO RP_CMG01 (ACCT_NO, LAST_NAME, FIRST_NAME, MID_NAME) VALUES(@ACCT_NO, @LAST_NAME,
@FIRST_NAME, @MID_NAME)";
command.Parameters.AddWithValue("@ACCT_NO", dataGridView1.CurrentCell.Value);
command.Parameters.AddWithValue("@LAST_NAME", dataGridView1.CurrentCell.Value);
command.Parameters.AddWithValue("@FIRST_NAME", dataGridView1.CurrentCell.Value);
command.Parameters.AddWithValue("@MID_NAME", dataGridView1.CurrentCell.Value);