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 8650887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:55:46+00:00 2026-06-12T13:55:46+00:00

EDIT#2 I changed the Title name because it no longer represented the question I

  • 0

EDIT#2

I changed the Title name because it no longer represented the
question I am asking. It turns out my problem was displaying the &
symbol in a c# winforms label.

Enter "&" symbol into a text Label in Windows Forms?

That is the answer to the question which turns out is a duplicate

This was the original

I am currently using c# and sql. I have no problem writing to the database, when I check the field using MS SQL Server Manager, I can see the & symbol in the varchar field. but when I retrieve it using c# it seems to be omitted.

myTable.myColumn =" Me & You";

string testString="";
SQLConnection con = new SQLConnection(...)
SQLCommand command=new SQLCommand("Select Top 1 * from myTable",con)
SQLDataReader reader= command.ExecuteQuery()
while (reader.read())
{
    testString=reader["myColumn"].ToString();
    MessageBox.Show(testString);
}

output = Me You

I wrote this on the fly, it likely is not syntactically correct. Is this normal output or do I likely have a mistake somewhere?

EDIT #1 so it turns out that the MessageBox does display the &. The object this loads into holds the & symbol as well. Even the label that is displaying the symbol holds the & symbol in its .Text property eg. myLabel.Text == “Me & You”. but the display to the screen still says Me you. so the Problem has nothing to do with SQL, but simply to do with Winforms, I will Likely delete this question shortly, unless someone else has experienced this and can offer some insight to speed my troubleshooting

  • 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-06-12T13:55:47+00:00Added an answer on June 12, 2026 at 1:55 pm
    myTable.myColumn =" Me & You";
    
    string testString="";
    SQLConnection con = new SQLConnection(...)
    SQLCommand command=new SQLCommand("Select Top 1 * from myTable",con)
    SQLDataReader reader= command.ExecuteQuery()
    while (reader.read())
    {
        testString=reader["myColumn"].ToString().Replace("&","&&");
        MessageBox.Show(testString);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: I have changed the question as it was too localized and gained negative
I like Stack Overflow's URLs - specifically the forms: /questions/{Id}/{Title} /users/{Id}/{Name} It's great because
[Edit] changed return 0 to return . Side effects of beinga Python n00b. :)
Is there a way to know if TAdoQuery in Edit state was changed? Assuming
Edit: Read the lines in bold to find where I'm having problems. I changed
[EDIT] This question is how do I do atomic changes to entity beans with
sorry, for the cryptic title i didn't find any better summary for my problem.
So I asked a question with the same title earlier and got an answer
EDIT : I added the file field, and changed the creation of the jobenrollment
I am using the Jeditable JQuery plugin to make edit in place changes to

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.