Page 1 of 1

TMyConnection and property Params

Posted: Wed 12 Jun 2013 14:30
by joelthomas
Hi

Is it possible to change the default file path for the my.ini file.
By default, this file is stored in the windows directory. Is it possible to store my.ini file in an other folder (none admin profile user are not allowed to write in the windows directory)

Context :
Delphi 7
MyDac : 7.0.2
embedded mode
Component : TMyConnection

Thanks

Joel

Re: TMyConnection and property Params

Posted: Wed 12 Jun 2013 16:41
by DemetrionQ
Hello.

MyDAC uses the libmysqld.dll library to connect to the MySQL embedded server. The library searches the my.ini file in the "C:\" and "C:\WINDOWS" directories (there are also other search paths depending on the libmysql.dll version). To solve the problem, you can use TMyEmbConnection instead of TMyConnection. TMyEmbConnection allows you to work without the my.ini file, providing access to the MySQL embedded server settings by the TMyEmbConnection.Params, TMyEmbConnection.BaseDir and TMyEmbConnection.DataDir properties. You can find detailed information about TMyEmbConnection and its properties in the MyDAC documentation.

Re: TMyConnection and property Params

Posted: Mon 17 Jun 2013 13:51
by joelthomas
Hi,

Thanks for your answer.
Our internal framework is based on the TMyConnection component and it takes a lot of time to change it.
is there any other solution with a TMyConnection component ? I just need to transfer to the mysql dll, the path to store the my.ini file.

Thanks

Joel

Re: TMyConnection and property Params

Posted: Thu 20 Jun 2013 12:49
by DemetrionQ
Hello.

    The TMyConnection component doesn't provide a possibility to modify Embedded connection parameters. For this, you should use TMyEmbConnection. To change this behaviour, you can buy MyDAC with source code and add the possibility to set parameters via TMyConnection by yourself.