Hi.
I need to connect a TMyConnectio object to a mysql server embedded.
Everything is ok if i set the parameters 'datadir' and 'basedir' in a my.ini file placed in the C:/windows directory, but i would like to know if it's possible to set this parameters in other way, at run time.
In other words I don't want my component to read the my.ini file, but i need to set the basedir and datadir parameters. Is it possible? Any suggestion?
Thanks
Embedded connection parameters
-
AndreyZ
Hello,
To set the basedir and datadir parameters at run-time, you should use the TMyEmbConnection component. Here is a code example:
To set the basedir and datadir parameters at run-time, you should use the TMyEmbConnection component. Here is a code example:
Code: Select all
MyEmbConnection.BaseDir := 'basedir';
MyEmbConnection.DataDir := 'datadir';
MyEmbConnection.Database := 'databasename';
MyEmbConnection.LoginPrompt := False;
MyEmbConnection.Connect;-
AndreyZ