如果从标量返回字符串
,建议使用以下内容Dim lJobName as String = String.Empty
Dim oJobName as object = SqlCommand.ExecuteScalar()
If oJobName Is Nothing Then
'Do something with the error condition
Else
lJobName = oJobName.ToString
End If
如何创建一个通用函数来帮助我捕获其他数据类型(所以执行标量 - 可以返回整数或布尔值或字符串
此致