Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:如何在同一查询代码中实现查询2个数据源中的数据

1楼
lanbor 发表于:2023/12/15 20:50:00
请教专家:
我在外部数据源中链接了2个数据源:MES_DBS 和 ERP_DBS
如:物料信息在ERP_DBS库的Item_base 表中,
      而产品扫码出库记录在MES_DBS库的DeliveryHistory
针对一下查询方法,如何在一个语句组中查询到2个数据源中的信息?
 'Dim cmd As New SQLCommand
'   cmd.ConnectionNa me = "MES_DBS"    '----请教这数据源语句应该如何写?
'   cmd.Comma ndText = "Se lect *  fr om {Item_base}  As a inner join  {DeliveryHistory}  As b on a.Item_code = b.Item_code "
'    cmd.Comma ndText += "where a.Item_Code='" & Vars("_Fnumber") & "'  order by b.Deliver_date desc "
    Dim dDTb01 As DataTable = cmd.ExecuteReader()
先谢谢专家!
[此贴子已经被作者于2023/12/15 20:53:32编辑过]
2楼
有点蓝 发表于:2023/12/16 9:19:00
无法使用sql连接2个数据源。

换种方式:http://www.foxtable.com/webhelp/topics/2320.htm
或者:http://www.foxtable.com/webhelp/topics/2305.htm
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01953 s, 2 queries.