我想要一个返回字符串的函数,例如“AirForce”。
代码如下。但它返回Nothing。
需要帮助。
Dim CLWorkGroup As String = DALC.GetDALC.GetWorkGroupByAssignmentID(strAssignmentID, objJobOrderDetailGUID)
Public Function GetWorkGroupByAssignmentID(ByVal id As String, ByVal guid As Guid) As String
Return DirectCast(Me._objJobAssignmentTableAdapter.JobAssignmentGetWorkGroupByAssignmentID(id, guid), String)
End Function
存储过程:
Alter PROCEDURE dbo.JobAssignmentGetWorkGroupByAssignmentID
(
@AssignmentID AS NVARCHAR,
@Guid uniqueidentifier
)
AS
SET NOCOUNT ON;
SELECT CLWorkGroup
FROM JobAssignment
WHERE (AssignmentID = @AssignmentID) AND (JobOrderDtlID=@Guid)
GO