RowFilter - Accent Insensitive with Strings

R

Robson Luiz

Hello Folks!

I have a SQL Server table column and two records.
One column have "Porão" and the other "Porao".

I want filter my dataview using the RowFilter property.

example:

dv.RowFilter = "column = 'Porao'"

datagrid.datasource=dv
datagrid.databind();

I need to see two records. But i see only one because the filter use accent
sensitive when searching.

Is there a way to configure the dataset for accent sensitive?

Tks
Robson
 
I

ianstirkcv

Hi,

you could use a variation of the String.CompareOrdinal function. Please see below:


Dim strTest As String = "Ägypten"
Dim strTest2 As String = "Agypten"

If String.CompareOrdinal(strTest, strTest2) Then
MessageBox.Show("Are same")
Else
MessageBox.Show("Are different")
End If



Hope this helps
Ian
 
R

Robson 'Soares

Tks. This solution is not good because user can choose any string.
Sometimes there are lots of ways to write a word. Different words can
have different accents,etc.

Robson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top