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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:32:49+00:00 2026-06-09T14:32:49+00:00

i have the probleme with accent (example: é,à,è, etc). when i inserted directly on

  • 0

i have the probleme with accent (example: é,à,è, etc).
when i inserted directly on SQL Server 2008 Management
INSERT INTO LETTRE_VOIT (LIB_PORT) VALUES ('Payé') it work well.
but when i load this syntax on C#, it not work.

 try
            {
                using (var connectionWrapper = new Connexion())
                {
                    var connectedConnection = connectionWrapper.GetConnected();


                    string sql_Syntax = Outils.LoadFileToString(HttpContext.Current.Server.MapPath("~/SQL/UpdateEtClotureList.sql"));
                    SqlCommand comm_Command = new SqlCommand(sql_Syntax, connectionWrapper.conn);
                    comm_Command.Parameters.AddWithValue("@CHAUFFEUR", CHAUFFEUR);
                    comm_Command.Parameters.AddWithValue("@Trans", ClotList);
                    string IdOrdre = "";
                    SqlDataReader readerOne = comm_Command.ExecuteReader();
                    while (readerOne.Read())
                    {
                        if (IdOrdre != "") IdOrdre += ",";
                        IdOrdre += readerOne["NO_ORDRE"].ToString();                    
                    }
                    return IdOrdre;
                }
            }
            catch (Exception excThrown)
            {
                throw new Exception(excThrown.Message);
            }

the content of UpdateEtClotureList.sql:

DECLARE @AfterUpdate table (
    NO_ORDRE_Temp int NOT NULL, 
    CODE_DEST_Temp varchar(10) NOT NULL,
    DATE_CLOTUR_Temp datetime NOT NULL, 
    CODE_CLIENT_Temp varchar(20) NOT NULL,
    MODAL_MODE_Temp char(1) NOT NULL,
    MODAL_PORT_Temp bit NOT NULL,
    LIVRS_EXPRS_Temp bit NOT NULL,
    ENLEV_UNITE_Temp int NOT NULL,
    NBR_COLIS_Temp int NOT NULL,
    POID_Temp decimal(10, 2) NOT NULL,
    ENLEV_CREMB_Temp decimal(10, 2)  NULL,
    ENLEV_DECL_Temp decimal(10, 2)  NULL

  )  

UPDATE ORDRE 
SET STATUT_ORDRE = 2, DATE_CLOTUR = GETDATE(), CHAUFFEUR = @CHAUFFEUR
OUTPUT inserted.NO_ORDRE, inserted.CODE_DEST, inserted.DATE_CLOTUR, inserted.CODE_CLIENT, inserted.MODAL_MODE, inserted.MODAL_PORT,inserted.LIVRS_EXPRS,inserted.ENLEV_UNITE,  inserted.NBR_COLIS,inserted.POID,inserted.ENLEV_CREMB,inserted.ENLEV_DECL INTO @AfterUpdate
WHERE STATUT_ORDRE = 1 AND (TRANSPORTEUR IN (SELECT ParsedString From dbo.ParseStringList(@Trans)))



INSERT INTO LETTRE_VOIT 

OUTPUT inserted.NO_ORDRE

select rsVoit.NOID, NO_ORDRE_Temp, rsOrdre.CODE_DEST_Temp,rsOrdre.DATE_CLOTUR_Temp, rsOrdre.CODE_CLIENT_Temp, rsOrdre.MODAL_MODE_Temp, rsOrdre.MODAL_PORT_Temp,
CASE rsOrdre.MODAL_PORT_Temp
            WHEN 'false' THEN 'Payé'
            ELSE 'Du'
        END, 
rsOrdre.LIVRS_EXPRS_Temp,
CASE rsOrdre.LIVRS_EXPRS_Temp
            WHEN 'false' THEN 'Long'
            ELSE 'Express'
        END, 
  rsOrdre.ENLEV_UNITE_Temp, LIBELLE, NBR_COLIS_Temp,POID_Temp,ENLEV_CREMB_Temp,ENLEV_DECL_Temp
from @AfterUpdate rsOrdre
inner join
(
  select CODE_DEST,MODAL_MODE, MODAL_PORT, LIVRS_EXPRS,ENLEV_UNITE, ROW_NUMBER() over (order by CODE_DEST) as NOID
  from ORDRE
  group by CODE_DEST,MODAL_MODE,MODAL_PORT,LIVRS_EXPRS,ENLEV_UNITE
) rsVoit on rsVoit.CODE_DEST = rsOrdre.CODE_DEST_Temp and rsVoit.MODAL_MODE = rsOrdre.MODAL_MODE_Temp
and rsVoit.MODAL_PORT = rsOrdre.MODAL_PORT_Temp and rsVoit.LIVRS_EXPRS = rsOrdre.LIVRS_EXPRS_Temp
and rsVoit.ENLEV_UNITE = rsOrdre.ENLEV_UNITE_Temp

LEFT JOIN T_UNITE ON rsOrdre.ENLEV_UNITE_Temp = T_UNITE.NOID

order by rsVoit.NOID, NO_ORDRE_Temp

the result is Pay*, instead of Payé , * is a square symbol.

Thanks you in advance.

PS: i use nvarchar instead of varchar type nvarchar

when i change the syntax:

....
CASE rsOrdre.MODAL_PORT_Temp
            WHEN 'false' THEN N'Payé'
            ELSE 'Du'
        END, 
rsOrdre.LIVRS_EXPRS_Temp,
.....

i got:
result

and when i look via SQL Profiler:
enter image description here

  • 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-09T14:32:50+00:00Added an answer on June 9, 2026 at 2:32 pm

    Is LoadFileToString corrupting the SQL? What happens if you print that out? Do you still see the é character?

    What if you change the SQL to

    WHEN 'false' THEN 'Pay' +CHAR(233)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem while loading data into html select when users press or click
I have a String to Date conversion problem using SQL Bulkcopy in asp.net 3.5
I am new to socket programming and ran into a puzzling problem: I have
I write FTPS server, and I have problems with ssl connection after AUTH TLS
Does LocationManager have the ability to change, from example, from GPS to a more
I have an boost asio server application and I'm struggling with how to transmit
I wrote a small HTTP server in Java and I have a problem passing
I have a DropDownList with items like: BEDROOM KITCHEN BATHROOM LIVING_HALL......etc.. I have a
I have two domains: accounts.example.org app.example.org Now I want to do a HTTP DELETE
I have problem with http://abfoodpolicy.com/ . In IE 8 and 9 the right sidebar

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.