我在下面得到了这个代码:
Dim lJobName As String = ""
SQLCommand.CommandText = "Select JobName from Jobs where Id = @Id "
SQLCommand.Parameters.Add(New SqlParameter("@Id", SqlDbType.Int))
SQLCommand.Parameters(0).Value = var_id
lJobName = SQLCommand.ExecuteScalar()
如果没有找到记录,问题如何捕获?