以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 自定义函数返回内容异常 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=186191) |
-- 作者:z769036165 -- 发布时间:2023/4/12 9:32:00 -- 自定义函数返回内容异常 部门表有三列,其中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 |
-- 作者:有点蓝 -- 发布时间:2023/4/12 9:34:00 -- …… If w IsNot Nothing Then qcc = w("name") & "_" & qcc Return Functions.Execute("根据ID获取部门全称", w("parent"), qcc, dt) Else Output.Show(qcc) Return qcc End If |