MySQL has gone away
Posted: 24.11.2017, 02:29
I'm just starting with Zeoslib components. I've run into something that, from the research I've done, shouldn't be happening. None of the homework I've done references the issue we're having.
A form is opened and all queries execute correctly. However, when I open another form from that form, and then return, I get "MySQL has gone away".
I've set up a timer to check the ZConnection is still connected. All tests say that ZConnection1 is still connected.
I've also changed the max_allowed_packet to 64M and wait_timeout to 36000 in My.ini. No change.
The query in question is:
with FCGlobalQu do
begin
Close;
SQL.Clear;
SQL.Add('select * from fcglobal where coycode =:iCoyCode');
ParamByName('iCoyCode').AsInteger := StrToInt(sActCoy);
Open;
end;
The error is triggered on "open". That query is run when the form first opens. It needs to run again to make sure the updated contents of fcglobal are available.
Any ideas would be appreciated.
Thanks.
Alan
A form is opened and all queries execute correctly. However, when I open another form from that form, and then return, I get "MySQL has gone away".
I've set up a timer to check the ZConnection is still connected. All tests say that ZConnection1 is still connected.
I've also changed the max_allowed_packet to 64M and wait_timeout to 36000 in My.ini. No change.
The query in question is:
with FCGlobalQu do
begin
Close;
SQL.Clear;
SQL.Add('select * from fcglobal where coycode =:iCoyCode');
ParamByName('iCoyCode').AsInteger := StrToInt(sActCoy);
Open;
end;
The error is triggered on "open". That query is run when the form first opens. It needs to run again to make sure the updated contents of fcglobal are available.
Any ideas would be appreciated.
Thanks.
Alan