How do I get a scalar value from a stored proc using Nettiers
Posted
by Micah
on Stack Overflow
See other posts from Stack Overflow
or by Micah
Published on 2010-05-07T15:15:29Z
Indexed on
2010/05/07
15:28 UTC
Read the original article
Hit count: 277
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 with 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?
© Stack Overflow or respective owner