Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
哪个老师帮看看如下代码,用了外部数具后就报错.
Dim cm As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim dt3 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker3")
Dim dt4 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker4")
Dim dst As WinForm.DataList = e.Form.Controls("DataList4")
If dt3.Value Is Nothing OrElse dt4.Value Is Nothing orelse cm.value is nothing Then
MessageBox.Show("请输入帐号及起始日期和终止日期!","提示")
e.Cancel = True
End If
Dim dtb As New DataTableBuilder("统计1")
dtb.AddDef("日期", GetType(Date))
dtb.AddDef("收支", GetType(String),32)
dtb.AddDef("类别", GetType(String),32)
dtb.AddDef("摘要", GetType(String),32)
dtb.AddDef("币种", GetType(String),32)
dtb.AddDef("金额", GetType(Double))
dtb.AddDef("收支帐号",GetType(String),32)
dtb.AddDef("往来",GetType(String), 32)
dtb.Build()
DataTables("统计1").DataRows.Clear() '清除原有数据
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText = "SELECT * From {销帐录入}"
dim tb as datatable = cmd.ExecuteReader()
dim f As New Filler
f.SourceTable = tb '指定数据来源
f.SourceCols = "收付日期,收付,收付公司,摘要,币制,实际收付金额,收付帐号" '指定数据来源列
f.DataTable = DataTables("统计1") '指定数据接收表
f.DataCols = "日期,收支,类别,摘要,币种,金额,收支帐号" '指定数据接收列
f.Distinct = False
f.Filter = "[收付日期] >= #" & dt3.value & "# and [收付日期] <= #" & dt4.value & "# and 收付帐号 = '" & cm.value & "'"
f.Fill() '填充数据
cmd.CommandText = "SELECT * From {办公开支}"
dim tb1 as datatable = cmd.ExecuteReader()
dim f1 As New Filler
f1.SourceTable = tb1 '指定数据来源
f1.SourceCols = "日期,收支,类别,摘要,币种,金额,收支帐号,往来" '指定数据来源列
f1.DataTable = DataTables("统计1") '指定数据接收表
f1.DataCols = "日期,收支,类别,摘要,币种,金额,收支帐号,往来" '指定数据接收列
f1.Distinct = False
f1.Filter = "[日期] >= #" & dt3.value & "# and [日期] <= #" & dt4.value & "# and 收支帐号 = '" & cm.value & "'"
f1.Fill() '填充数据
dst.DataTable = DataTables("统计1")
dst.Build()
错误提示截图呢?