MartinCroft
Programmer
Hi
I’ve several dynamic textboxs/combo boxes which can be added and deleted from the screen these are populated from a datatable and looped through each datarow populating the textboxes as below
Dim drow As DataRow
For Each drow In dt.Rows
when I come to read any changes back into the datrow i get an error message Operator is not valid for type DBNULL and nothing
It is showing the datarowstate has been modified when this is not the case so i did an compare of the current against original datarowversion which works ok apart from when using dbnull values
I have tried checking (******* below) for nothing, vbnull, dbnull (couldn't figure syntax for this one out)
Case DataRowState.Modified
If Not drow(j, DataRowVersion.Current) = Nothing then *******
If drow(j, DataRowVersion.Current) <> drow(j, DataRowVersion.Original) Then
I believe all I need to do is just not compare the values when is is dbnull but don’t know how to check any help is appreciated
I’ve several dynamic textboxs/combo boxes which can be added and deleted from the screen these are populated from a datatable and looped through each datarow populating the textboxes as below
Dim drow As DataRow
For Each drow In dt.Rows
when I come to read any changes back into the datrow i get an error message Operator is not valid for type DBNULL and nothing
It is showing the datarowstate has been modified when this is not the case so i did an compare of the current against original datarowversion which works ok apart from when using dbnull values
I have tried checking (******* below) for nothing, vbnull, dbnull (couldn't figure syntax for this one out)
Case DataRowState.Modified
If Not drow(j, DataRowVersion.Current) = Nothing then *******
If drow(j, DataRowVersion.Current) <> drow(j, DataRowVersion.Original) Then
I believe all I need to do is just not compare the values when is is dbnull but don’t know how to check any help is appreciated