How do I get a single value from a stored proc using Nettiers
- by Micah
I have a really simple stored procedure that looks like this:
CREATE PROCEDURE _Visitor_GetVisitorIDByVisitorGUID
(
@VisitorGUID AS UNIQUEIDENTIFIER
)
AS
DECLARE @VisitorID AS bigint
SELECT @VisitorID = VisitorID FROM dbo.Visitor WHERE VisitorGUID = @VisitorGUID
--Here's what I've tried
RETURN @VisitorID 'Returns an IDataReader
SELECT @VisitorID 'Returns an IDataReader
--I've also set it up wuth a single output
--parameter, but that means I need to pass
--the long in by ref and that's hideous to me
I'm trying to get nettiers to generate a method with this signature:
public long VisitorService.GetVisitorIDByVisitorGUID(GUID visitorGUID);
Basically I want Nettiers to call ExecuteScalar instead of ExecuteReader. What am I doing wrong?