Cannot open embedded Database in folder with UNICODE path
Posted: Mon 20 Nov 2017 10:00
Hi,
I'm using the following code to open my embedded database with Delphi XE 10.1 and MyDac (9.1.3):
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.
Please, can you let me know what's wrong?
Thanks!
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;Code: Select all
---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class Exception with message ''.
---------------------------
Break Continue Help
---------------------------Thanks!