Q: select (case insensitive)

  • Thread starter Thread starter G .Net
  • Start date Start date
G

G .Net

Hi

I'm using the Select member of a DataTable in vb.net. In the datatable I
have a field which holds a string. I want to do something like:

Dim name As String = "mike"
Dim rows As DataRow() = dt.Select("[Name] = " & name)

This returns all rows which have "mike" but not "MIKE" or "Mike".

Can anybody tell me how to achieve this?

Thanks in advance
 
G said:
Hi

I'm using the Select member of a DataTable in vb.net. In the datatable I
have a field which holds a string. I want to do something like:

Dim name As String = "mike"
Dim rows As DataRow() = dt.Select("[Name] = " & name)

This returns all rows which have "mike" but not "MIKE" or "Mike".

Can anybody tell me how to achieve this?

Thanks in advance

Set the DataTable.CaseSensitive property to false.
 
Hi Tom

Thanks!

Tom Shelton said:
Hi

I'm using the Select member of a DataTable in vb.net. In the datatable I
have a field which holds a string. I want to do something like:

Dim name As String = "mike"
Dim rows As DataRow() = dt.Select("[Name] = " & name)

This returns all rows which have "mike" but not "MIKE" or "Mike".

Can anybody tell me how to achieve this?

Thanks in advance

Set the DataTable.CaseSensitive property to false.
 
Back
Top