R
Ronald S. Cook
In the code below, I get a runtime error where indicated. The error is:
"Column 'TICKETNO' does not belong to table TICKET_DEDUCTIONS."
If I put a breakpoint on that line (so not yet executed) and type
?dedrow(c), It says basically the same thing:
Run-time exception thrown : System.ArgumentException - Column 'TICKETNO'
does not belong to table TICKET_DEDUCTIONS.
But if I type ?dedrow. the intellisense does show that TICKETNO is a
property.
Does anything jump out at anybody as being blatantly wrong?
Thanks,
Ron
Here is the code:
For Each dedrow In dsdeductions.TICKET_DEDUCTIONS
If dedrow(7, DataRowVersion.Original) = drow.cntID Then
If dedrow.RowState <> DataRowState.Added Then
ndedrow = DsPurchaseReceiver1.TICKET_DEDUCTIONS.NewRow
For Each c In DsPurchaseReceiver1.TICKET_DEDUCTIONS.Columns
If c.ColumnName <> "cntID" Then
ndedrow(c) = dedrow(c, DataRowVersion.Original) <<<---- ERRORS
HERE
End If
Next
ndedrow.RecDetailsID = ndrow.cntID
DsPurchaseReceiver1.TICKET_DEDUCTIONS.AddTICKET_DEDUCTIONSRow(ndedrow)
End If
End If
Next
"Column 'TICKETNO' does not belong to table TICKET_DEDUCTIONS."
If I put a breakpoint on that line (so not yet executed) and type
?dedrow(c), It says basically the same thing:
Run-time exception thrown : System.ArgumentException - Column 'TICKETNO'
does not belong to table TICKET_DEDUCTIONS.
But if I type ?dedrow. the intellisense does show that TICKETNO is a
property.
Does anything jump out at anybody as being blatantly wrong?
Thanks,
Ron
Here is the code:
For Each dedrow In dsdeductions.TICKET_DEDUCTIONS
If dedrow(7, DataRowVersion.Original) = drow.cntID Then
If dedrow.RowState <> DataRowState.Added Then
ndedrow = DsPurchaseReceiver1.TICKET_DEDUCTIONS.NewRow
For Each c In DsPurchaseReceiver1.TICKET_DEDUCTIONS.Columns
If c.ColumnName <> "cntID" Then
ndedrow(c) = dedrow(c, DataRowVersion.Original) <<<---- ERRORS
HERE
End If
Next
ndedrow.RecDetailsID = ndrow.cntID
DsPurchaseReceiver1.TICKET_DEDUCTIONS.AddTICKET_DEDUCTIONSRow(ndedrow)
End If
End If
Next