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.
 

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

Back
Top