J
John3
Hi there,
I have an SQL function (not stored procedure) that returns a single
variable. The function works and I can preview its results in VS. However,
it always returns null when I invoke it in code through my TableAdapter. I'm
reasonably sure it's caused by the underlying call to
"SqlCommand.ExecuteScalar()" which returns "the first column of the first
row in the result set, or a null reference ... if the result set is empty".
Since I'm returning a single variable only, does anyone know how to get it
working so that the latter call to "SqlCommand.ExecuteScalar()" will return
it. Thanks very much.
I have an SQL function (not stored procedure) that returns a single
variable. The function works and I can preview its results in VS. However,
it always returns null when I invoke it in code through my TableAdapter. I'm
reasonably sure it's caused by the underlying call to
"SqlCommand.ExecuteScalar()" which returns "the first column of the first
row in the result set, or a null reference ... if the result set is empty".
Since I'm returning a single variable only, does anyone know how to get it
working so that the latter call to "SqlCommand.ExecuteScalar()" will return
it. Thanks very much.