vb.net函数什么都不返回

时间:2017-06-13 16:04:31

标签: vb.net stored-procedures dataset

我想要一个返回字符串的函数,例如“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

readme

0 个答案:

没有答案