-- 表达式问题
Dim dtp1 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker1")
Dim dtp2 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker2")
Dim filter As String
filter="案件时间>=\'"& dtp1.value &"\' And 案件时间<\'" & dtp2.value.AddDays(1) &"\'"
e.form.controls("Table1").Table.fill("S elect 案由,Sum(处罚金额) as 金额合计 From {案卷档案} where "& filter &" Group By 案由","ajxxSQL",True)
fill后面where条件的表达式应该怎么写SQL SERVER数据库