How to use unicode with TEntityConnection?
-
- Posts: 7
- Joined: Fri 11 Mar 2016 13:25
- Location: Curitiba, Brazil
How to use unicode with TEntityConnection?
Hello everyone,
I use latin charset with unicode, so, have anyone set unicode within the connection string for TEntityConnection?
I use latin charset with unicode, so, have anyone set unicode within the connection string for TEntityConnection?
Re: How to use unicode with TEntityConnection?
Hello,
To work with Unicode characters, you simply need to add the Useunicode parameter in the ConnectionString:
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';
-
- Posts: 7
- Joined: Fri 11 Mar 2016 13:25
- Location: Curitiba, Brazil
Re: How to use unicode with TEntityConnection?
I have tried and it returns this error message
Connection parameter name is unknown: UseUnicode
Re: How to use unicode with TEntityConnection?
What EntityProvider and database are you using?
-
- Posts: 7
- Joined: Fri 11 Mar 2016 13:25
- Location: Curitiba, Brazil
Re: How to use unicode with TEntityConnection?
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.
I tried change the connection string to use PgDac as found in the documentation, however, the company seens to not have it installed.
Re: How to use unicode with TEntityConnection?
Thank you for the information. We have reproduced the problem in the UniDAC Provider and will try to fix it as soon as possible.
Re: How to use unicode with TEntityConnection?
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:
Please specify the connection string that you are using to establish connection via PgDAC.
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';
Re: How to use unicode with TEntityConnection?
Did you fix this problem?
I have PostgreSQLUniProvider and EntityConnection
and if I use UseUniCode=True in EntityConnection.ConnectionString it returns the same message
by Open:
In the list of ProviderName I do not see it...
EntityDAC v2.3.4
PostgreSQL 9.6
I have PostgreSQLUniProvider and EntityConnection
and if I use UseUniCode=True in EntityConnection.ConnectionString it returns the same message
and without unicodeConnection parameter name is unknown: UseUnicode
Code: Select all
var
Query: ILinqQueryable;
begin
Query := Linq.From(EntityContext1['abk']).Select;
edsABK.SourceCollection := EntityContext1.GetEntities(Query);
edsABK.Open;
end;
Or how can I PgDAC as a EntityConnections DataProvider to use?character with byte sequence 0xc3 0xbc in encoding "UTF8" has no equivalent in encoding "WIN1251"
In the list of ProviderName I do not see it...
EntityDAC v2.3.4
PostgreSQL 9.6
Re: How to use unicode with TEntityConnection?
As we said earlier, the error is caused by the missing parameter ProviderName, which is required when you use UniDACDataProvider.
Please verify that your connection string contains this parameter:
Please verify that your connection string contains this parameter:
Code: Select all
EntityConnection.ConnectionString := 'ProviderName=PostgreSQL;Data Provider=UniDAC;SQL Dialect=PostgreSQL;Data Source=... ...';
Re: How to use unicode with TEntityConnection?
The problem is that we cannot to install at the same time EntityDAC and PgDAC because the both pgdac use, however, different versions of it and they stand always during the conflict!
This prevents you from setting TPgDACDataProvider as a visual component, you have to spell in the code
This prevents you from setting TPgDACDataProvider as a visual component, you have to spell in the code
Code: Select all
EntityConnection1.ProviderName := 'PgDAC';