I retrieve data from database like below. How do I check whether the value retrieved from database is null?
Private Function GetBatch() As DataSet
Dim dataset As New DataSet
Dim adapter As Data.SqlClient.SqlDataAdapter
Dim cn As New System.Data.SqlClient.SqlConnection(connectionstring())
GetBatchCommand.Connection = cn
adapter = New Data.SqlClient.SqlDataAdapter(GetBatchCommand)
adapter.Fill(dataset)
Return dataset
End Function
Dim dataset As New DataSet
dataset = GetBatch()
With dataset.Tables(0)
Dim PersonID As String = .Rows(int).Item("personId")
I'd like to check whether personID is null. How do do that?