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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:46:51+00:00 2026-05-15T15:46:51+00:00

In VS 2005 C#, While inserting Euro (€) Symbol into Db2 table, It is

  • 0

In VS 2005 C#, While inserting Euro (€) Symbol into Db2 table, It is storing values correctectly. DISABLEUNICODE=1 parameter helped to store this correctly.

But when we try to read from the table, it is giving junk char as below.

“Spec GS 1”

Same code is working in VB 6.0 ADO

Could you please help me.


Code:

OdbcConnection con = new OdbcConnection();
OdbcDataAdapter dataAdapter = new OdbcDataAdapter("SELECT * FROM XXXX.XXXX" , con);
OdbcCommand odbcCommand =
    new OdbcCommand(
        "INSERT INTO   XXXX.XXXX( BREACH_TYPE,JURISDICTION,ACTIVE ,VERIFIED , UPDATED_TS , UPDATED_BY ,VERIFIED_TS ,VERIFIED_BY)VALUES ('Spec GS € 1','IRE','Y','Y',CURRENT TIMESTAMP,'XECCRT3',CURRENT TIMESTAMP,'XECCRT8')");

con.ConnectionString = "DSN=DSNT;UID=xxxxxx;PWD=xxxxxx;MODE=SHARE;DBALIAS=DSNT;DISABLEUNICODE=1;PATCH1=1024;LONGDATACOMPAT=1;LOBMAXCOLUMNSIZE=1048575;PATCH2=6;";
con.Open();

odbcCommand.Connection = con; 
odbcCommand.ExecuteNonQuery();

dataAdapter.SelectCommand.CommandTimeout = 0;

DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet);
DataTable result = dataSet.Tables[0];

string Text = result.Rows[0][0].ToString();

MessageBox.Show(Text = result.Rows[0][0].ToString());

con.Close(); 
  • 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-15T15:46:52+00:00Added an answer on May 15, 2026 at 3:46 pm

    After reading the text from DataSet, used the following encoding function to display correct data.

     private static string ConvertToAsciiString(string str)
    {            
        Encoding source = Encoding.Default ;
        Encoding dest = Encoding.Unicode ;
    
        // Convert the string into a byte[].
        byte[] sourceBytes = dest.GetBytes(str);
    
        // Perform the conversion from one encoding to the other.
        byte[] destBytes = Encoding.Convert(source, dest, sourceBytes);
    
        string asciiString = dest.GetString(destBytes);
        asciiString = asciiString.Replace("\0", string.Empty);
    
    
        return asciiString; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 490k
  • Answers 490k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer First of all, it's a really bad idea to use… May 16, 2026 at 9:17 am
  • Editorial Team
    Editorial Team added an answer If you are not dead set on using a listbox,… May 16, 2026 at 9:17 am
  • Editorial Team
    Editorial Team added an answer killproc will terminate programs in the process list which match… May 16, 2026 at 9:17 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

sql server 2005 : i have a column empid in employee table with identity
I use SQL Server 2005. I have a simple logging table that my web
I have a table in SQL Server 2005 database that has following columns: Id,ProductName,Year,Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
I'm looking for a way to continue execution of a transaction despite errors while
I have a temp table (question_desc, ans1, ans2, ans3, ans4, correct_ans, marks) with say
In SQL Server 2005, is there a way I can create a INSERT script
Is there any portable version of Visual Studio (2005, 2008, 2010..)? Is it possible
Only for MSSQL 2000-2005 by SQL query and no stored procedures No cursors and
i try this code in sql server 2005 declare @userName nvarchar(50) set @userName='איש2' print
I am using these technologies: SQL Server 2005, ASP.NET MVC, NHibernate/sharp architecture and would

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.