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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:46:36+00:00 2026-05-12T17:46:36+00:00

As part of an integration task I am doing, I have a column in

  • 0

As part of an integration task I am doing, I have a column in my database that has the type nvarchar(30) and I need call a WCF service and pass through the values in this column (among others) that will then be stored in a column that has the type varchar(30) in the other database.

What should I do (presumably in the code that calls the WCF service) to convert my strings into “varchar friendly” strings?

Update: Nothing has gone wrong yet. However I will be doing an initial migration of 120,000 records through this service and then about 300 new records will be pushed through this service each day. As such, manual intervention of any kind is very undesirable and I’m just thinking about what might go wrong in advance. I have no control over the target database (with VARCHAR column), however I do know that it is SQL Server and C# for the application (not sure if they’re using ADO.NET).

  • 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-12T17:46:37+00:00Added an answer on May 12, 2026 at 5:46 pm

    There is nothing you have to do : all strings in .NET are UTF-16 encoded :

    • when you retrieve your NVARCHAR column (using ADO .NET I presume), you automatically get a .NET string (UTF-16, any necessary conversion is automatic).
    • when you store this .NET string in a VARCHAR column, any necessary conversion from UTF-16 is automatically performed as well.

    See here for more information on data type mappings for Sql Server in ADO .NET.

    You just have to make sure that all your strings can be converted flawlessly from the source character set to the destination character set.

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

Sidebar

Related Questions

As part of my integration strategy, I have a few SQL scripts that run
Part of my table design is to include a IsDeleted BIT column that is
I currently have a Windows Service which continually runs throughout the day. It has
Continuous integration concept has just been integrated in my team. Assume we have an
I have a whole lot of Coded UI tests that I developed as part
Here's part of an integration test that I'm having: user = User.first assert !user.is_active?
I have some integration tests that test the processing of USB data from a
We are using continuous integration as part of our build automation. For every check
Part of my app caches web pages for offline viewing. To do that, I
Part of a complex query that our app is running contains the lines: ...(inner

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.