以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 无法绑定由多个部门组成的标识符 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=117617) |
-- 作者:czquickly -- 发布时间:2018/4/16 11:34:00 -- 无法绑定由多个部门组成的标识符 ids1= ids1.Trim(",") cmd1.Con nection Name = "E R P" cmd1.CommandText = "select B.TA001+\'-\'+B.TA002 AS A,B.TA006,B.TA202,B.TA200,B.TA226,B.TA029,C.TA003 FR O M {MOCTA} B" & _ "LEFT JOIN {WENZP999} C ON B.TA001=C.TA001 AND B.TA002=C.TA002 " & _ "WHERE B.TA006 In (" & ids1 & ") And (B.TA011=\'1\' OR B.TA011=\'2\' OR B.TA011=\'3\') " dt1 = cmd1.ExecuteReader() For Each r1 As Row In Tables("料件维护").Rows r1("ERP最早齐套日") = dt1.GetComboListString("B.TA202","B.TA006 = \'" & r1("产品品号") & "\'AND A = \'" & r1("工单编号") & "\'") r1("ERP标识") = dt1.GetComboListString("B.TA226","B.TA006 = \'" & r1("产品品号") & "\'AND A = \'" & r1("工单编号") & "\'") r1("ERP确定交期") = dt1.GetComboListString("B.TA200","B.TA006 = \'" & r1("产品品号") & "\'AND A = \'" & r1("工单编号") & "\'") r1("ERP备注") = dt1.GetComboListString("B.TA029","B.TA006 = \'" & r1("产品品号") & "\'AND A = \'" & r1("工单编号") & "\'") \'r1("EPR排程日期") = dt1.GetComboListString("C.TA003","B.TA006 = \'" & r1("产品品号") & "\'AND A = \'" & r1("工单编号") & "\'") Next请问这段代码要怎么修改成狐表能识别的,按SQL得语法程序报无法绑定由多个部门组成的标识符
[此贴子已经被作者于2018/4/16 11:37:30编辑过]
|
-- 作者:有点甜 -- 发布时间:2018/4/16 11:41:00 -- 把表名去掉,如
r1("ERP最早齐套日") = dt1.GetComboListString("TA202","TA006 = \'" & r1("产品品号") & "\' AND A = \'" & r1("工单编号") & "\'") |