以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  是否可以用代码写关联?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=179258)

--  作者:lgz518
--  发布时间:2022/8/15 15:56:00
--  是否可以用代码写关联?
目前,关联操作,帮助写,用菜单“关联”进行关联生成关联表或不生成模关联表进行模拟关联。

是否纯用代码写关联?比如在窗口打开进行关联,窗口关闭就关联,而具多人操作,也就是局域网操作不影响别人,如果可以,
代码如何实现?



--  作者:狐狸爸爸
--  发布时间:2022/8/15 16:26:00
--  
http://www.foxtable.com/webhelp/topics/1942.htm
--  作者:lgz518
--  发布时间:2022/8/15 16:49:00
--  
\'Dim DataCols1(1) As DataCol
\'Dim DataCols2(1) As DataCol
\'DataCols1(0) = DataTables("产品").DataCols("品名")
\'DataCols1(1) = DataTables("产品").DataCols("型号")
\'DataCols2(0) = DataTables("订单").DataCols("品名")
\'DataCols2(1) = DataTables("订单").DataCols("型号")
\'Relations.Add("po", DataCols1, DataCols2)
上面不是窗口的表,窗口的表如何处理?

--  作者:有点蓝
--  发布时间:2022/8/15 16:52:00
--  
如果是副本,只能使用副本对应的主表进行关联

如果是sqltable,表名称使用参考:http://www.foxtable.com/webhelp/topics/1907.htm

--  作者:lgz518
--  发布时间:2022/8/15 17:14:00
--  
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.ObjectDisposedException: 无法访问已释放的对象。
对象名:“oo0ooO”。
   在 System.Windows.Forms.Control.CreateHandle()
   在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   在 System.Windows.Forms.Control.CreateControl()
   在 System.Windows.Forms.Control.WmShowWindow(Message& m)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   在 System.Windows.Forms.Form.WmShowWindow(Message& m)
   在 System.Windows.Forms.Form.WndProc(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** 已加载的程序集 **************
mscorlib
    程序集版本:4.0.0.0
    Win32 版本:4.8.4300.0 built by: NET48REL1LAST_C
    基本代码:file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Foxtable
    程序集版本:2022.6.7.1
    Win32 版本:2022.06.07.01
    基本代码:file:///D:/HBKF/foxtable.exe
----------------------------------------
Foxtable.Lib
    程序集版本:2022.5.22.1
    Win32 版本:2022.05.22.1
    基本代码:file:///D:/HBKF/Foxtable.Lib.DLL
----------------------------------------
ActiproSoftware.Text.WinForms
    程序集版本:22.1.2.0
    Win32 版本:22.1.2.0
    基本代码:file:///D:/HBKF/ActiproSoftware.Text.WinForms.DLL
----------------------------------------
System
    程序集版本:4.0.0.0
    Win32 版本:4.8.4300.0 built by: NET48REL1LAST_C
    基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
ActiproSoftware.Shared.WinForms
    程序集版本:22.1.2.0
    Win32 版本:22.1.2.0
    基本代码:file:///D:/HBKF/ActiproSoftware.Shared.WinForms.DLL
----------------------------------------
Microsoft.VisualBasic
    程序集版本:10.0.0.0
    Win32 版本:14.8.3752.0 built by: NET48REL1
    基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Core
    程序集版本:4.0.0.0
    Win32 版本:4.8.4320.0 built by: NET48REL1LAST_C
    基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    程序集版本:4.0.0.0
    Win32 版本:4.8.4270.0 built by: NET48REL1LAST_C
    基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    程序集版本:4.0.0.0
    Win32 版本:4.8.3752.0 built by: NET48REL1
    基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
C1.Win.C1Ribbon.4
    程序集版本:4.0.20191.359
    Win32 版本:4.0.20191.359
    基本代码:file:///D:/HBKF/C1.Win.C1Ribbon.4.DLL
----------------------------------------
System.Configuration
    程序集版本:4.0.0.0
    Win32 版本:4.8.4190.0 built by: NET48REL1LAST_B
    基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    程序集版本:4.0.0.0
    Win32 版本:4.8.3752.0 built by: NET48REL1
    基本代码:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ActiproSoftware.Text.Addons.DotNet.WinForms
    程序集版本:22.1.2.0
    Win32 版本:22.1.2.0
    基本代码:file:///D:/HBKF/ActiproSoftware.Text.Addons.DotNet.WinForms.DLL


--  作者:有点蓝
--  发布时间:2022/8/15 17:24:00
--  
请上传实例说明
--  作者:lgz518
--  发布时间:2022/8/16 10:51:00
--  
窗口上,订单A是正表,订单B是副表,或  订单A是正表,订单B是正表,窗口上无法实现,订单A订单B的显示,如何实现?

\'Dim TablesCols1(1) As TablesCol
\'Dim TablesCols2(1) As TablesCol
\'TablesCols1(0) = Tables("订单A").TablesCols("日期")
\'TablesCols1(1) = Tables("订单A").TablesCols("客户")
\'TablesCols2(0) = Tables("订单B").TablesCols("日期")
\'TablesCols2(1) = Tables("订单B").TablesCols("客户")
\'Relations.Add("po", TablesCols1, TablesCols2)

--  作者:有点蓝
--  发布时间:2022/8/16 11:23:00
--  
窗口里无法显示动态生成的关联表。建议使用模拟关联:
--  作者:lgz518
--  发布时间:2022/8/16 11:51:00
--  
这个也不太友好,如果可以话,实际这个比模拟关联来简单,更实用,建议改进一下,谢谢
--  作者:有点蓝
--  发布时间:2022/8/16 11:59:00
--  
很多时候确实不太友好,但是受限于框架或者各种原因,也只能如此。