Hi. I am using the following code to pull a single result from a SQL table.
I need a way to check if the result returns more than one value first.
Is there a way to build that into this code? If not what code would I need
to run first to see if there is a single value returned for this SQL statement
Dim connection As New SqlConnection(oConnectionString)
Dim cmd As New SqlCommand(sSQL, connection)
oResult = cmd.ExecuteScalar.ToString
If IsDBNull(oResult) = True Then
Get_Value = "Null"
Get_Value = oResult