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

  • Home
  • SEARCH
  • 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 4536582
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:33:21+00:00 2026-05-21T14:33:21+00:00

An app I’m working on is storing Unicode strings in an NVARCHAR(50) column in

  • 0

An app I’m working on is storing Unicode strings in an NVARCHAR(50) column in an SQL Server 2005 database.

Sometimes, the database returns a string padded with spaces up to the max length of the column (50). At other times the padding doesn’t happen.

I think that the type of this column was originally specified as NCHAR, but that when we realized the spaces were being added, we changed it to NVARCHAR(50). Could this have anything to do with it?

Either way, can this ‘feature’ be turned off?

Clarification

I just realized that what I wrote above doesn’t make it clear that even newly-inserted strings are getting padded with spaces.

  • 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-21T14:33:22+00:00Added an answer on May 21, 2026 at 2:33 pm

    NCHAR pads the field, NVARCHAR doesn’t. But if the data is from the old field then the spaces will remain until trimmed.

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

Sidebar

Related Questions

Our app (already deployed) is using an Access/Jet database. The upcoming version of our
My app streams content (fixed sized files, hence quotation marks) from an HTTP server
My app seems to crash sometimes when I rotate the phone. ViewControllerA has a
My app has many controls on its surface, and more are added dynamically at
An app I'm writing always crashes on a clients computer, but I don't get
My app is installed via NSIS. I want the installer to install the program
My app uses a WebRequest at certain points to get pages from itself. This
My app keeps track of the state of about 1000 objects. Those objects are
My app has a DataGridView object and a List of type MousePos. MousePos is
My app needs to build a buffer from all the selected cells on a

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.