部门表有三列,其中id为部门id ,name为部门名称,parent为父部门
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText = "se lect id,name,parent from dept"
Dim dt As DataTable = cmd.ExecuteReader
Dim s As String = Functions.Execute("根据ID获取部门全称", "15aee8147ea5e26390f0f72499db5ee0", "", dt)
MessageBox.Show(s)
结果Return返回是空的,但是Output.Show(qcc)显示又有内容,包括把Return qcc改成 Return "123" 都返回不出来,帮忙看下是什么问题?
自定义函数代码:Dim fid As String = Args(0)
Dim qcc As String = Args(1)
Dim dt As DataTable = Args(2)
Dim w As DataRow = dt.Find("id = '" & fid & "'")
If w IsNot Nothing Then
qcc = w("name") & "_" & qcc
Functions.Execute("根据ID获取部门全称", w("parent"), qcc, dt)
Else
Output.Show(qcc)
Return qcc
End If