Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Accent Insensitive Select in DataTable

Accent Insensitive Select in DataTable

Scheduled Pinned Locked Moved Database
databasequestioncsharpalgorithmshelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    darXstar
    wrote on last edited by
    #1

    hi, I've this problem : we work with a sql database which operates in accent-insensitive mode, once I've cached some data from it to my .NET application, how can I search within this data (contained in a DataTable) with an accent-insensitive query? I mean I'd like to obtain the same result (i.e.) " André " in any case if user is searching for: DataTable.Select("name LIKE 'andré') DataTable.Select("name LIKE 'andrè') DataTable.Select("name LIKE 'andre') thanks to anyone may answer Darx

    M 1 Reply Last reply
    0
    • D darXstar

      hi, I've this problem : we work with a sql database which operates in accent-insensitive mode, once I've cached some data from it to my .NET application, how can I search within this data (contained in a DataTable) with an accent-insensitive query? I mean I'd like to obtain the same result (i.e.) " André " in any case if user is searching for: DataTable.Select("name LIKE 'andré') DataTable.Select("name LIKE 'andrè') DataTable.Select("name LIKE 'andre') thanks to anyone may answer Darx

      M Offline
      M Offline
      Mark J Miller
      wrote on last edited by
      #2

      Not sure which CultureInfo to use but I'd recommend setting the Locale propery of the DataTable. Try Invariant culture setting - it should ignore accents.

      D 1 Reply Last reply
      0
      • M Mark J Miller

        Not sure which CultureInfo to use but I'd recommend setting the Locale propery of the DataTable. Try Invariant culture setting - it should ignore accents.

        D Offline
        D Offline
        darXstar
        wrote on last edited by
        #3

        thanks for your reply, I've tried but with no success. It seems there is no way to directly perform an accent insensitive research with Select() function in a DataTable as like as in sql environment. could somebody suggest a workaround?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups