Rss & SiteMap

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

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

标题:显示数据类型错误,但不知道怎么纠正

1楼
floor2 发表于:2009/8/2 23:45:00
   Dim s1,s2,s3,sum1 As double
    s1 = DataTables("期初库存").Compute("Sum(重量)","[克重] = " & e.DataRow("克重")   and "[编号] = '" & e.DataRow("编号") & "'" and "[幅宽] = " & e.DataRow("幅宽"))
    s2 = DataTables("生产清单").Compute("Sum(重量)","[克重] = " & e.DataRow("克重")   and "[编号] = '" & e.DataRow("编号") & "'" and "[幅宽] = " & e.DataRow("幅宽"))
    s3 = DataTables("发货清单").Compute("Sum(重量)","[克重] = " & e.DataRow("克重")   and "[编号] = '" & e.DataRow("编号") & "'" and "[幅宽] = " & e.DataRow("幅宽"))
    sum1=s1+s2-s3
    e.Datarow("重量") =Sum1


库存表的一个计算公式,“克重”列改变时弹出窗口说 字符串 到long 转换无效,不知道代码哪里需要改动,谢谢。
2楼
czy 发表于:2009/8/3 0:39:00
Dim s1,s2,s3 As double
Dim dr As DataRow = e.DataRow
Dim s As String = "[克重]  = " & dr("克重") & " And [编号] = '" & dr("编号") & "' And [幅宽] = " & dr("幅宽")
s1 = DataTables("期初库存").Compute("Sum(重量)",s)
s2 = DataTables("生产清单").Compute("Sum(重量)",s)
s3 = DataTables("发货清单").Compute("Sum(重量)",s)
dr("重量") = s1+s2-s3
[此贴子已经被作者于2009-8-3 0:41:43编辑过]
共2 条记录, 每页显示 10 条, 页签: [1]

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

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