以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- insert into用法请教 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=143764) |
-- 作者:巷弄太过弯曲 -- 发布时间:2019/12/3 19:39:00 -- insert into用法请教 老师,请问我用以下代码做了一个K3查询界面,现在我想做一个新增界面,我想在K3后台数据库中用insert into的方法添加一条数据,这个代码需要怎么写 Dim cmd As New SQL Command Dim dt As Da taTable cmd.C onnec tionNa me = "ce s hi" cmd.Comman dText = "SEL E CT top 2000 a.fbillno as 单据编号,c.Fname as 供应商 ,a.fdate as 日期 ,h.FName as 部门,d.fname as 物料名称,d.FModel as 规格型号,i.fname As 单位 ,e.Fname As 币别,b.FQty As 数量, " & _ " j.FName As 业务员,g.fname As 制单人 ,f.fname As 审核人, a.FCheckDate As 审核时间 From POOrder a left join POOrderentry b on a.finterid = b.finterid " & _ " left join t_Supplier c on a.FSupplyID = c.FItemID left join t_ICItem d on b.fitemid = d.fitemid left join t_Currency e on a.FCurrencyID = e.FCurrencyID left join t_User f on a.fcheckerid = f.FUserID " & _ " left join t_User g on a.FBillerID = g.fuserid left join t_Department h on a.FDeptID = h.fitemid left join t_MeasureUnit i on b.fUnitID = i.FMeasureUnitID left join t_emp j on a.FEmpID = j.fitemid" & filter dt = cmd.ExecuteReader() Tables("采购订单查询_Table1").DataSource = dt |
-- 作者:有点蓝 -- 发布时间:2019/12/3 20:23:00 -- 参考:http://www.foxtable.com/webhelp/topics/3266.htm |
-- 作者:巷弄太过弯曲 -- 发布时间:2019/12/4 15:28:00 -- 老师,像我这样left join 得到的表格,用这个方法写吗 |
-- 作者:有点蓝 -- 发布时间:2019/12/4 15:33:00 -- 是的 |