Hi

I am getting the 'Operator is not valid for type 'DBNull' and string "".'
error on the following line;

If (mydatatable.Rows.Item(I).Item("Forenames") Is System.DBNull.Value) Then
' 'I' is the loop variable from 0 To mydatatable.Rows.Count - 1.

Any ideas on what is the reason for this error?

Thanks

Regards

Re: comparison error by Chance

Chance
Tue Oct 28 01:39:34 CST 2003

try

(mydatatable.Rows.Item(I).Item("Forenames") Is System.DBNull)




"John" <john@nospam.infovis.co.uk> wrote in message news:#VPBWsOnDHA.1676@TK2MSFTNGP09.phx.gbl...
> Hi
>
> I am getting the 'Operator is not valid for type 'DBNull' and string "".'
> error on the following line;
>
> If (mydatatable.Rows.Item(I).Item("Forenames") Is System.DBNull.Value) Then
> ' 'I' is the loop variable from 0 To mydatatable.Rows.Count - 1.
>
> Any ideas on what is the reason for this error?
>
> Thanks
>
> Regards
>
>
>



Re: comparison error by tperovic

tperovic
Thu Oct 30 19:43:49 CST 2003

If mydatatable.Rows(i).IsNull("Forenames") Then

"John" <john@nospam.infovis.co.uk> wrote in message
news:#VPBWsOnDHA.1676@TK2MSFTNGP09.phx.gbl...
> Hi
>
> I am getting the 'Operator is not valid for type 'DBNull' and string "".'
> error on the following line;
>
> If (mydatatable.Rows.Item(I).Item("Forenames") Is System.DBNull.Value)
Then
> ' 'I' is the loop variable from 0 To mydatatable.Rows.Count - 1.
>
> Any ideas on what is the reason for this error?
>
> Thanks
>
> Regards
>
>
>