Dim db = HySqGl.DataBaseFactory.CreateDatabase("db")
Dim Sql = "SelecGt 前缀,Year(制单日期) As 年, Month(制单日期) As 月, Max(单据编号) as 单据编号 From h_tb Group By 前缀,Year(制单日期), Month(制单日期);"
Dim dt As system.data.DataTable = db.ExecuteDataSet(SqGl).Tables(0)
flbhs.Clear()
For Each dr As system.data.DataRow In dt.rows'模式
Dim qz As String = dr("前缀") & "-" & dr("年") & Format(dr("月"), "00") '
Dim bh As String = dr("单据编号")
Dim id As Integer
If bh.Length = 16 Then
bh = bh.SubString(12)
If Integer.TryParse(bh, id) Then
flbhs.Add(qz, id)
End If
End If
Next
报错:参数“Expression”不是有效值。如何改?