How to use unicode with TEntityConnection?

How to use unicode with TEntityConnection?

Postby rodrigobarbosa » Fri 17 Jun 2016 16:49

Hello everyone,

I use latin charset with unicode, so, have anyone set unicode within the connection string for TEntityConnection?
rodrigobarbosa
 
Posts: 7
Joined: Fri 11 Mar 2016 13:25
Location: Curitiba, Brazil

Re: How to use unicode with TEntityConnection?

Postby AlexP » Mon 20 Jun 2016 08:58

Hello,

To work with Unicode characters, you simply need to add the Useunicode parameter in the ConnectionString:

Code: Select all
EntityConnection1.ConnectionString: = EntityConnection1.ConnectionString + '; UseUnicode = True';
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: How to use unicode with TEntityConnection?

Postby rodrigobarbosa » Mon 20 Jun 2016 13:18

I have tried and it returns this error message
Connection parameter name is unknown: UseUnicode
rodrigobarbosa
 
Posts: 7
Joined: Fri 11 Mar 2016 13:25
Location: Curitiba, Brazil

Re: How to use unicode with TEntityConnection?

Postby AlexP » Tue 21 Jun 2016 09:36

What EntityProvider and database are you using?
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: How to use unicode with TEntityConnection?

Postby rodrigobarbosa » Tue 21 Jun 2016 11:27

I use uniDAC connecting to postgres database, don´t know if it matters but the connection changes between two different server with postgres 9.1 and 9.5, but both give me the same message.

I tried change the connection string to use PgDac as found in the documentation, however, the company seens to not have it installed.
rodrigobarbosa
 
Posts: 7
Joined: Fri 11 Mar 2016 13:25
Location: Curitiba, Brazil

Re: How to use unicode with TEntityConnection?

Postby AlexP » Mon 27 Jun 2016 08:44

Thank you for the information. We have reproduced the problem in the UniDAC Provider and will try to fix it as soon as possible.
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: How to use unicode with TEntityConnection?

Postby bork » Wed 29 Jun 2016 12:25

If you use UniDAC as data provider, you should specify ProviderName, because UniDAC allows connection to various databases. In your case, this connection string is valid:
Code: Select all
EntityConnection.ConnectionString := 'Data Provider=UniDAC;ProviderName=PostgreSQL;SQL Dialect=PostgreSQL;UseUniCode=True;Server=your_server;Port=5432;User=your_user;Password=your_password';

Please specify the connection string that you are using to establish connection via PgDAC.
bork
Devart Team
 
Posts: 643
Joined: Fri 12 Mar 2010 07:55


Return to EntityDAC