Case "filter.htm"
wb.AddForm("","form1","list.htm")
With wb.AddInputGroup("form1","ipg1","数据筛选")
.AddInput("product","产品名称","string")
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
End With
Case "list.htm"
Dim flt As String
If e.PostValues.ContainsKey("product") Then
flt = "img01 = '" & e.PostValues("product") & "'"
End If
Dim cmd As new SQLCommand
cmd.C
' cmd.CommandText= "S ELECT {img_file}.img01 as 产品编码, ima02 as 产品名称 ,{img_file}.img02 as 仓库编号,{img_file}.img03,{img_file}.img10 as 库存数量 FROM {img_file} INNER JOIN {ima_file} ON {img_file}.img01 = {ima_file}.ima01 ORDER BY img01"
cmd.CommandText= "S ELECT img01 as 产品编码,img02 as 仓库编号 ,img10 as 库存数量 from img_file"
If flt > "" Then
cmd.CommandText = cmd.CommandText & " where " & flt
End If
With wb.AddTable("","Table1")
.CreateFromDataTable(cmd.ExecuteReader)
End With
With wb.AddButtonGroup("","btg1",True)
.Add("btn1", "重新筛选", "","filter.htm")
End With
红色字体的语句用不了,一用就报错
而下面一个command.text就可以用
[此贴子已经被作者于2017/7/22 15:53:34编辑过]