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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:54:27+00:00 2026-05-26T11:54:27+00:00

I’m developing an app where I need to insert names using special characters like

  • 0

I’m developing an app where I need to insert names using special characters like áéíóúñ and I’m using linq to entities with Visual C#.

My database server is SQL 2008 express and the default collation of my database is SQL_Latin1_General_CP1251_CI_AS, however I changed the collation of the fields to SQL_Latin1_General_CP1_CI_AI where I need to insert the special characters mentioned above.

If I insert names with special characters using code similar to this:

 Cliente cli = new Cliente()
            {
                Nombres = cliente.nombres,
                ApellidoP = cliente.apellidoP,
                ApellidoM = cliente.apellidoM,
                FechaNac = cliente.fechaNacimiento
            };
            context.clientes.AddObject(cli);
            context.SaveChanges();

The special characters are translated to their equivalent, but if I insert names with special characters directly in the database (management studio) I have no problems inserting those characters.

I changed fields collation to SQL_Latin1_General_CP1_CI_AI after creating my project in visual studio, so I thought updating model from database would solve the problem but I was wrong.
I also used the debugger to check if special characters were present when I create a new instance of Cliente object, and yes, they’re there.

What could be the problem?

  • 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-26T11:54:28+00:00Added an answer on May 26, 2026 at 11:54 am

    I do not see anything wrong with your code or approach. This seems to be an issue with the Database. The best soltion would be to change the BD collation to SQL_Latin1_General_CP1_CI_AI, but that is usually hard to do if you are pass the development phase.

    You could try one of the following:

    Eliminate the entity or entities that have the field properties that hold the special characters from your model, run Update Model from Database again and re-add the tables. Sometimes an update is not enough to refresh the entities, and maybe your field specific collation configuratino was not taken into account the first time.

    Take a look at this post. Maybe the problem has to do with the design of your tables.

    Or this other post. Using a similar approach, maybe it is possible to change the collation of your BD (if it is not being used by other applications – not likely).

    Hope this helps.

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

Sidebar

Related Questions

I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I need to clean up various Word 'smart' characters in user input, including but
I have thousands of HTML files to process using Groovy/Java and I need to
I am using Paperclip to handle profile photo uploads in my app. They upload
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace

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.