Mike,
You may want to check for dbnull.value as well as execute scalar returns nothing is there is absolutly nothing returned like your where clause excludes everything or it returns dbnull if there are records but the value is null.
>result = cmd.ExecuteScalar()
>if (result is not nothing) andalso (result isnot dbnull.value)'is this correct VB syntax?
> result = result.ToString
>else
> result = ""
>endif
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only