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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T03:06:39+00:00 2026-05-17T03:06:39+00:00

Trying to insert values with Unicode Chars into a MySQL-database using Delphi 2010 and

  • 0

Trying to insert values with Unicode Chars into a MySQL-database using Delphi 2010 and TADOConnection with no luck.

Connection with ODBC

Provider=MSDASQL.1;Persist Security Info=False;Data Source=mysrc;Initial Catalog=mydb

The SQL command:

INSERT INTO myTable (aCol) VALUES('Russian: русский язык')

Tried inserting it directly with

TADOConnection.Execute(SQL)

It only ends up in the database as “Russian: ??????? ????”

Also tried the method suggested here:
http://www.3delite.hu/Object%20Pascal%20Developer%20Resources/delphiunicodemysqltutorial.html

With TADOQuery do
   begin
   SQL.Clear;
   SQL.Add('INSERT INTO myTable (aCol) VALUES(:p));
   Parameters.ParamByName('p').DataType := ftWideString;
   Parameters.ParamByName('p').Value := 'Russian: русский язык';
   ExecSQL;
end;

Making this in code doesn’t work at all for me, only if I add parameters in designtime, but then it’s still the same result in the database with questionmarks all over.

  • 1 1 Answer
  • 2 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-17T03:06:39+00:00Added an answer on May 17, 2026 at 3:06 am

    It seems TADOConnection doesn’t support Unicode, at least I can’t get it to work.

    If I instead use dbExpress TSQLConnection and TSQLQuery to insert to the database it works as intended. But I must do it with Parameters and not with directly with an INSERT command

                    with qTarget.Params.ParamByName('p' + IntToStr(i)) do
                    begin
                        DataType    := ftWideString;
                        Value           := Fields[i].AsWideString;
                    end;
                    qTarget.ExecSQL;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to insert values into an Access database using a parameterized query:
hi am trying to insert values into SQL database using jdbc. Current code able
I'm dealing with unknown data and trying to insert into a MySQL database using
I'm trying to insert values from my asp.net application into my MySQL database. On
I am trying to insert some values into an sql database. I am using
I am trying to insert values into Oracle 10g database using the code below
I am trying to insert certain values into the table using SQL server 2005.
I am trying to insert the values from textfields in the database using hibernate
I have a problem using the MySQLdb library. I'm trying to insert values into
I am trying to insert an entry into a database using a form created

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.