centech-group
asked on
.Net Dataview Data Filter not always working
We have a drop-down list whose datasource is a dataview. We are filtering the drop-down based on the value of phase, which can be ‘A’, ‘E’ or ‘P’. Our filter looks at MST_Auxiliary_Value, which is either an empty string, ‘A’ or ‘<>A’. This code to set the filter:
CType(EMP_Status.DataSourc e, DataView).RowFilter = "Trim(MST_Auxiliary_Value) = '' or IIF(LEN(MST_Auxiliary_Valu e) < 3,MST_Auxiliary_Value = '" & phase & "',Substring(MST_Auxiliary _Value,3,1 ) <> '" & phase & "')"
This filter works fine on our computers. We are including rows with an empty auxiliary value and those that match the phase (or don’t match the phase in the ‘<>A’ case). On our client’s computer, we are getting the other rows but not the one where MST_Auxiliary_Value is an empty string. What could possibly be causing this discrepancy?
We checked their data and everything has the right value and correct lengths. Our computers are Windows 7 and XP. The client’s computer that had the problem is XP.
CType(EMP_Status.DataSourc
This filter works fine on our computers. We are including rows with an empty auxiliary value and those that match the phase (or don’t match the phase in the ‘<>A’ case). On our client’s computer, we are getting the other rows but not the one where MST_Auxiliary_Value is an empty string. What could possibly be causing this discrepancy?
We checked their data and everything has the right value and correct lengths. Our computers are Windows 7 and XP. The client’s computer that had the problem is XP.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.