>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