ReceiveCompHeader : Nets packet out of order : received[205],expected[1]

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

ReceiveCompHeader : Nets packet out of order : received[205],expected[1]

Post by swierzbicki » Fri 28 Apr 2006 10:27

Hello,

I'm using FastReport 3.21 + frxMyDAC components.
One of my frxMyDAC SQL statement looks like this one :
Drop TEMPORARY Table If Exists tmpTable;
Create TEMPORARY Table If Not Exists tmpTable
Select * from Emp where EMPNO = :prempno;

Select * from tmpTable;
Before displaying the report, i'm setting the parameter to the corresponding record.

If the report is stored on the DFM , On first report preview, I'm getting an fastreport error. If I do another preview I'm getting an ReceiveCompHeader error.

After closing my report all MyQuery are throwing me ReceiveCompHeader error. I'm then no more able to browse any gird / close my connection...

It looks like the frxMyDAC components is messing something. I badly need to use tmp table for this particular report.

Thank you

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 28 Apr 2006 14:07

It's unlikely that this error concerns using MyDAC component for FastReport. Can you reproduce this error without using FastReport?
Please supply us following information in any case:
- Steps to reproduce the problem
- Exact version of Delphi, C++ Builder or Kylix
- Exact version of MyDAC. You can see it in About sheet of TMyConnection Editor
- Exact version of MySQL server and MySQL client. You can see it in Info sheet of TMyConnection Editor

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Sat 29 Apr 2006 07:10

I'm "sorry" but I can reproduce this only within fastreport designer.

Steps to reproduce are really easy (design time):

- create a new project
- add the myDAC Connection and set it
- add FastReports componens
- add the FastReport MyDAC component and set the default database
- double click on the FastReport to edit the report
- add a MyQuery component
- fill the SQL query with this :
Set @TMyParam = :prMyParam;
Select *, @TMyParam from emp;
or
Set @TMyParam = :prMyParam;
Select @TMyParam ;
- add a master band and link it to the myquery component
- preview the report => you will get the "ReceiveCompHeader" error

I also get this error if I put something like this in the FastReport Code section :

MyQuery := TfrxMyQuery.create;
Myquery.SQL.text = ('Set @TMyParam = :prMyParam; Select *, @TMyParam from emp;');
Myquery.Open;

Any help will be really appreciated.

Thank you

I'm using the latest MySQLDAC build (4.30.0.12)
I'm using the lastest FastReport version 3.21
I'm using mySQL server 4.12a
I'm using BDS2006 + SP2

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 04 May 2006 08:58

This is MySQL sever issue. To solve this problem try using

Code: Select all

    Set @TMyParam = :prMyParam;
    Select @TMyParam
instead of

Code: Select all

    Set @TMyParam = :prMyParam;
    Select @TMyParam ;
As you can see, the last semicolon is deleted.

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Fri 05 May 2006 08:36

Nice to see that you found this bug.
Will it not be wise to introduce "a fix" in the mydac components ? : before executing the script/statement, remove the ending delimiter

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 05 May 2006 08:58

We don't think that modifying user's query is an acceptable behavior for a library.

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Fri 05 May 2006 09:10

Allright , that was just a though

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Mon 15 May 2006 11:33

I come back again with this issue.
If I set an Master/Detail relation , I will get the ReceiveCompHeader error too (even when I remove the last ";").

Isn't it possible to fix it ?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 15 May 2006 12:56

Please send us (EvgeniyD*crlab*com) a complete small sample to demonstrate the problem, including script to create and fill table.
Also supply us following information:
- Exact version of FastReport
- Exact version of MySQL server and MySQL client. You can see it in Info sheet of TMyConnection Editor

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 16 May 2006 11:43

Thank you for sample. As we can see, the problem disappears when the last semicolon is deleted for all query components in you example. This issue can be easly repeated without FastReport using following code:

Code: Select all

  MyQuery1.SQL.Text := 'SELECT * FROM dept;';
  MyQuery1.FieldDefs.Update;
  MyQuery1.FieldDefs.Updated := False;
  MyQuery1.FieldDefs.Update;
This code crashes connection and this connection doesn't work until reconnect. The only fix we can suggest for this MySQL server issue is deleting last semicolon in query.

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Tue 16 May 2006 15:35

This code crashes connection and this connection doesn't work until reconnect. The only fix we can suggest for this MySQL server issue is deleting last semicolon in query.
Well, I understand that MySQL is having a bug with this last semicolon,but tell me why this crashes the current connection ! That's not logical and very "dangerous" when you are working with single connection (I do it since I'm using user variable)...

Is Corelab willing to solves this ?

Anyway, thank you for your quick answer.

Best Regards,

Stephane Wierzbicki

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 17 May 2006 09:08

We agree with you. This bug is dangerous and can lead to data loss, but we can't provide any suitable solution for it. All we can can do is reporting about this bug to MySQL AB.

Post Reply