OK, Ahmad ... that may be a difference between C# and VB. It works fine with C#.
~~Bonnie
>Thanks Bonnie,
>I had to use "Is DBNull", because it's geving me an error on "!="
>
>
>
>>Ahmad,
>>
>>You need to test for a NULL value:
>>
>>if myDS.Tables("Company").Rows(iRow).Item("Note") != DBNull.Value then
>> pbstrNotes = myDS.Tables("Company").Rows(iRow).Item("Note")
>>
>>
>>~~Bonnie
>>
>>>Dear All,
>>>I am trying to get a value from my DataSet and store it to the memvar as follow:
>>>
>>>Dim pbstrNotes As String
>>>pbstrNotes = myDS.Tables("Company").Rows(iRow).Item("Note")
>>>
>>>If the file empty
the system reases an error # 13
>>>("DBNull" to type 'String' is not valid)
>>>
>>>Any idea how to sove this pls.
>>>
>>>Thanks for the help