G
Guest
I am using a dataview to filter rows that have an 'access level' (this is a
column) less than the users 'access level'. The dataview is created with:
ContactDataView = New DataView(Me._stuadrk, _
"CONTACT_TYPE_PL <= '" +
Me._synonyms.UserPriv + "'", _
"SEQUENCE_NO", _
DataViewRowState.CurrentRows)
CONTACT_TYPE_PL is a column derived from an expression, it's type is string.
The type of Me._synonyms.UserPriv is also string. The underlying dataset is
set to be case sensitive.
My problem is that this filter fails when it should succeed. If the value
of CONTACT_TYPE_PL in a particular row is R and the value of Userpriv is ~
then the row is not included, it should be.
CONTACT_TYPE_PL UserPriv Rowindataview
R w Yes
R ~ No
However the relationship should succeed! Here is console output and how it
is generated:
Console.WriteLine("CONTACTS(LOAD): UA: " + Me._synonyms.UserPriv + _
" DataviewRowCount: " + ContactDataView.Count.ToString)
Console.WriteLine(Chr(9) + ContactDataView.RowFilter)
For Each DR As DataRow In Me._stuadrk.Rows
Console.WriteLine(Chr(9) + DR.Item("CONTACT_TYPE_PL") + Chr(9) + _
(CType(DR.Item("CONTACT_TYPE_PL"), String) <= _
Me._synonyms.UserPriv).ToString + Chr(9) + _
CType(DR.Item("SEQUENCE_NO"), Integer).ToString)
Next
CONTACTS(LOAD): UA: ~ DataviewRowCount: 2
CONTACT_TYPE_PL <= '~'
R True 1
True 2
True 3
Any help?
column) less than the users 'access level'. The dataview is created with:
ContactDataView = New DataView(Me._stuadrk, _
"CONTACT_TYPE_PL <= '" +
Me._synonyms.UserPriv + "'", _
"SEQUENCE_NO", _
DataViewRowState.CurrentRows)
CONTACT_TYPE_PL is a column derived from an expression, it's type is string.
The type of Me._synonyms.UserPriv is also string. The underlying dataset is
set to be case sensitive.
My problem is that this filter fails when it should succeed. If the value
of CONTACT_TYPE_PL in a particular row is R and the value of Userpriv is ~
then the row is not included, it should be.
CONTACT_TYPE_PL UserPriv Rowindataview
R w Yes
R ~ No
However the relationship should succeed! Here is console output and how it
is generated:
Console.WriteLine("CONTACTS(LOAD): UA: " + Me._synonyms.UserPriv + _
" DataviewRowCount: " + ContactDataView.Count.ToString)
Console.WriteLine(Chr(9) + ContactDataView.RowFilter)
For Each DR As DataRow In Me._stuadrk.Rows
Console.WriteLine(Chr(9) + DR.Item("CONTACT_TYPE_PL") + Chr(9) + _
(CType(DR.Item("CONTACT_TYPE_PL"), String) <= _
Me._synonyms.UserPriv).ToString + Chr(9) + _
CType(DR.Item("SEQUENCE_NO"), Integer).ToString)
Next
CONTACTS(LOAD): UA: ~ DataviewRowCount: 2
CONTACT_TYPE_PL <= '~'
R True 1
True 2
True 3
Any help?