老师好,我在网络监视器里面用异步的方法生成一张临时表(方法用new QueryBuilder),然后再用 New CrossTableBuilder对个临时表进入交叉统计,想生成json数据返回给网页端,运行的时候出错了,测试了一下,好像是错在new QueryBuilder环节。
但是如果去掉e参数后,直接在命令窗口里面执行自定义函数tongjirz的代码时,两个临时表都出现了,可以运行到最后,能看到生成json数据。
请帮看问题出在哪里,要如何修改?
Select Case e.Path
Case "tongjirz" '统计入住信息
e.AsyncExecute = True
Functions.AsyncExecute("tongjirz",e)
运行出错提示如入:
Exception has been thrown by the target of an invocation.
.NET Framework 版本:4.0.30319.1
Foxtable 版本:2020.5.29.8
错误所在事件:自定义函数,dttongji
详细错误信息:
Exception has been thrown by the target of an invocation.
Controls created on one thread cannot be parented to a control on a different thread.