Page 1 of 1

Error Lost Connection when Exit Form (Tmyquery - Fatchall=false)

Posted: Fri 19 Apr 2013 10:29
by azis
I have a problem when exit form , because the object Tmyquery, on select properties patchall = false. under his following query

sds_view_mst_kend.Close;
//sds_view_mst_kend.FetchAll := False;
sds_view_mst_kend.SQL.Text := 'select * from mst_kendaraan';
sds_view_mst_kend.FetchAll := False;
sds_view_mst_kend.FetchRows := 5;
dbg_view_mst_kend.DataSource :=ds_view_mst_kend;
sds_view_mst_kend.Open;

then the following script in the form exit button
if LibMY.GetMessage_NY('sure will exit ...?') = True then
begin
c_db.Close;
Action:=caFree;
end
else
Action:=caNone;

please help me...

Thank's

Azis

Re: Error Lost Connection when Exit Form (Tmyquery - Fatchall=false)

Posted: Fri 19 Apr 2013 12:25
by DemetrionQ
Hello.

MyDAC distribution includes a demo project located in the "MyDacDemo" folder in Demos of MyDAC. Please check if the problem can be reproduced on this demo project.

Re: Error Lost Connection when Exit Form (Tmyquery - Fatchall=false)

Posted: Fri 19 Apr 2013 22:54
by azis
Ok

Thank's

Azis

Re: Error Lost Connection when Exit Form (Tmyquery - Fatchall=false)

Posted: Wed 24 Apr 2013 16:25
by DemetrionQ
Hello.

In this case the 'Lost connection to MySQL server during query' error is an internal MyDAC error that is used for internal purposes.
Such MyDAC behaviour is correct, it is caused by specificity of working with not fetched data.
You will see the 'Lost connection to MySql server during query' error only if you run your application from the IDE.
You will not see this error when you run the executable file of your application.