Page 1 of 1
Changing params
Posted: Sat 15 Dec 2012 17:28
by mieszkom
Hi,
is any way to programtycaly change DB params by MyServerControl?
Re: Changing params
Posted: Mon 17 Dec 2012 13:51
by AndreyZ
Hello,
Please specify the exact database parameters that you want to change.
Re: Changing params
Posted: Tue 18 Dec 2012 07:14
by mieszkom
There are global parameters like server_id or max_allowed_packet. When I execute included in help statement:
Code: Select all
MyServerControl1.Variables['max_allowed_packet'] := '1234567890';
I get an error: #HY000SESSION variable 'max_allowed_packet' is read only. Use SET GLOBAL to assign a value.
SQL command using TMyScript "set global ...." works but I want to use TMyServerControl because it looks easier.
Re: Changing params
Posted: Tue 18 Dec 2012 10:31
by AndreyZ
To avoid the problem, you should specify the scope of a variable in the variable name. Here is a code example:
Code: Select all
MyServerControl1.Variables['global max_allowed_packet'] := '1234567890';
Re: Changing params
Posted: Tue 18 Dec 2012 11:16
by mieszkom
It works, tkank you very much

Re: Changing params
Posted: Tue 18 Dec 2012 11:56
by AndreyZ
I am glad I could help.