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
MySQL has gone away
Re: MySQL has gone away
"Solution" found.
I need to issue a Reconnect command when reentering the previous form.
I need to issue a Reconnect command when reentering the previous form.
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: MySQL has gone away
Hello Alancj,
the "MySQL server has gone away" message usually means thet the server has dropped the connection for some reason. This is nothung, Zeos can manage. There are several posts on stackoverflow about this issue, some suggestiong modifications of timeouts.
With best regards,
Jan
the "MySQL server has gone away" message usually means thet the server has dropped the connection for some reason. This is nothung, Zeos can manage. There are several posts on stackoverflow about this issue, some suggestiong modifications of timeouts.
With best regards,
Jan