下面的代码,在SQL SERVER下通过测试的,逐行比对一下你原来的代码,就知道你的为什么不行了,因为你将筛选和动态加载搞混了:
Dim Value() As String Dim Filter As String Value = e.Node.FullPath.Split("\") Select Case e.Node.Level Case 0 Filter = "[shipCountry] = '" & Value(0) & "'" Case 1 Filter = "[shipCountry] = '" & Value(0) & "' And [customerID] = '" & Value(1) & "'" Case 2 Filter = "[shipCountry] = '" & Value(0) & "' And [customerID] = '" & Value(1) & "' And [EmployeeID] = " & Value(2) End Select DataTables("Orders").LoadFilter = Filter DataTables("Orders").Load()
|