Page 1 of 1

Cannot open embedded Database in folder with UNICODE path

Posted: Mon 20 Nov 2017 10:00
by rahucha
Hi,

I'm using the following code to open my embedded database with Delphi XE 10.1 and MyDac (9.1.3):

Code: Select all

var
    FDatabaseEmbedded: TMyEmbConnection;

begin
    FDatabaseEmbedded := TMyEmbConnection.Create(Sender);
    FDatabaseEmbedded.LoginPrompt := False;
    FDatabaseEmbedded.Options.UseUnicode := True;
    FDatabaseEmbedded.DataDir := localDatabasePath;
    FDatabaseEmbedded.Database := 'Database';
    FDatabaseEmbedded.Connected := True;
I have my application and the database in the same folder. The code works great when the folder is an ANSI folder. As soon as I rename the folder with UNICODE chars (Chinese for example) in any part of the path, I get an exception on the "FDatabaseEmbedded.Connected := True" line.

Code: Select all

---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class Exception with message ''.
---------------------------
Break   Continue   Help   
---------------------------
Please, can you let me know what's wrong?

Thanks!

Re: Cannot open embedded Database in folder with UNICODE path

Posted: Mon 20 Nov 2017 13:59
by ViktorV
The issue when the the embedded database foldername contains international characters is not related to MyDAC, but is due to the MySQL client library specificities. Unfortunately, we can't affect this behavior.