I am executing a sql query, and I am getting an error Value cannot be null. Parameter name: dataTable
Code:
strSQLHost = "select HostBase.AppName from HostBase where HostBase.appid=0"
Dim dtHost As DataTable
Dim daHost As SqlDataAdapter = New SqlDataAdapter(strSQLHost, conn)
daHost.Fill(dtHost)
The error occurs at the daHost.Fill(dtHost)
When I run this query in SQL Enterprise manager, I get a value of 'None'. It's a valid value, not a null value.
How can I resolve this?