Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1115903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T03:13:31+00:00 2026-05-17T03:13:31+00:00

I have a datatable select like: productData.Select(Name = ‘AAA BBB # CCC’); I know

  • 0

I have a datatable select like:

productData.Select("Name = 'AAA BBB # CCC'");

I know the entry is there, it just doesn’t work because of the # character. I have tried escaping with [] like:

productData.Select("Name = 'AAA BBB [#] CCC'");

but it still doesn’t work. I know for single quotes I double them so ‘ becomes ”. But what other characters do I need to be concerned with and how to get this case to work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T03:13:31+00:00Added an answer on May 17, 2026 at 3:13 am

    Do you absolutely have to use DataTables like this? I’ve always been incredibly nervous of the text-based querying in DataTable for precisely this reason.

    If at all possible, I suggest you start using LINQ. You can do that with DataTable already, e.g.

    var query = products.AsEnumerable()
                        .Where(row => row.Field<string>("Name") == "AAA BBB # CCC");
    

    That way you don’t need to worry about escaping etc. If you use a strongly-typed dataset it becomes even simpler, as you can refer to properties directly instead of using string names.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataTable which I select from database (Well, these data cross several
I have a datatable on which I am applying Select() method. After that I
I have a SQL query that returns a Datatable: var routesTable = _dbhelper.Select(SELECT [RouteId],[UserId],[SourceName],[CreationTime]
I have datatable with column name tag and 100 rows of data.I need to
I have a Datatable in my C# program that I would like to INSERT
I have a DataTable MyDT like below: string MyConString = SERVER= + sConfig_hostname +
I have a datatable with user information and a column called 'Bits'. There is
I have data being returned in a DataTable that looks like: Department | EmployeeName
I have a multi-select listbox which I am binding to a DataTable. DataTable contains
I have a DataTable structured like this: username | price "jack" .01 "jack" .02

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.