Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetExecScalar Returns Nothing
Message
 
To
22/10/2004 15:28:29
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00953138
Message ID:
00954440
Views:
18
>Kevin, you were correct originally, this is a stored procedure.

The code you posted says "CREATE FUNCTION" rather than "CREATE PROCEDURE". CREATE FUNCTION creates a user defined function (UDF) which is called a little differently than a stored procedure...I see Bonnie has posted an equivalent stored procedure for you.

In the event that

>My breakdown in understanding seems to center on the requirement/usage of an output parameter.
>Do I need to use an output parameter?

If you're using a UDF, yes. Here's the code you need:
Public Function GetBatchAlreadyProcessed(ByVal batchID As Integer) As String

   Dim dao As mmDataAccessBase = Me.GetDataAccessObject
   Dim BatchIdParam As IDbDataParameter = dao.CreateParameter("@BatchId", batchID)

   Me.ExecSprocScalar("dbo.tsgsp_GetBatchAlreadyProcessedTF", BatchIdParam, ReturnValue)

   Return CStr(ReturnValue.Value)

End Function
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform