Page 1 of 3

ReceiveHeader : Net packets out of order : received[0], expexted[1]

Posted: Sun 12 Feb 2006 09:44
by CFaiga
some times I get the error message
ReceiveHeader : Net packets out of order : received[0], expexted[1]
My software then stops working

any ideas ?


- Exact version of Delphi : Delphi 7.0 (Build 8.1) Enterprise
- Exact version of MyDAC430d7.exe
- Exact version of MySQL version 5.0.18-win32

Posted: Sun 12 Feb 2006 19:59
by swierzbicki
well, with such few infos, i guess that nobody will be able to help you.
Can you provide an code exemple or better, send to mydac support a simple project demonstrating this. (with mysql database)

Posted: Sun 12 Feb 2006 20:11
by CFaiga
This problem happens when the system is very busy
most of my database access is done via stored proceudres

The problem happens when more than one stored proceudre is accessing the database at the same time

Posted: Mon 13 Feb 2006 12:34
by Ikar
Swierzbicki is right. This information isn't enough. First of all please check if this problem appears if you don't use Direct mode. Try to determine what component causes this error (MyQuery, MyCommand etc.), what queries are you executing when this error happens (single or multiple), how much times do you call Execute method without changing SQL property. But the best of all would be sending us complete simple example that demonstrates this error.

Re: ReceiveHeader : Net packets out of order : received[0], expexted[1]

Posted: Tue 14 Feb 2006 08:20
by earlati
CFaiga wrote:some times I get the error message
ReceiveHeader : Net packets out of order : received[0], expexted[1]
My software then stops working
any ideas ?
Just an hint:
I got this problem when I forgot the same connection inside different thread ( maybe a global connection or just one connection passed as parameter ).
Only a connection in the main program, called by a timer or inside the ActionList.Update method lead to this problem.

I hope this should help

Posted: Tue 14 Feb 2006 09:06
by GEswin
If you work with threads, you should use a connection for each thread. MyDac isn't thread-safe, this is probably what induces your problem.

Posted: Wed 19 Apr 2006 00:05
by CFaiga
If you work with threads, you should use a connection for each thread. MyDac isn't thread-safe, this is probably what induces your problem.

Part of my system is running under Midas

I only have one connection to the database


As the MyDac isn't thread-safe are rthey compatable with Midas ?
what must be done to make them thread safe ?

Posted: Wed 19 Apr 2006 08:40
by Antaeus
> As the MyDac isn't thread-safe ...
MyDAC can work in multithreaded applications, so it is thread safe. But the restriction is that you cannot use one component for more than one thread simultaneously.
> are rthey compatible with Midas ?
Yes, MyDAC is compatible with Midas. Please see Midas demo for example.
> what must be done to make them thread safe ?
In your case using one instanse of TMyConnection per thread must be helpful.

Using MIDAS with MyDac

Posted: Thu 05 Apr 2007 14:15
by CFaiga
Antaeus wrote:> As the MyDac isn't thread-safe ...
MyDAC can work in multithreaded applications, so it is thread safe. But the restriction is that you cannot use one component for more than one thread simultaneously.

With this limitation

> you can only use one component per thread simultaneously.

In my MIDAS App I have more than one TRemoteDataModule (RDM)
Does this mean I need a Connection for each RDM ?

Posted: Fri 06 Apr 2007 13:21
by Antaeus
> Does this mean I need a Connection for each RDM ?
Yes, it does.
Try to use MyDAC's pooling to prevent server overhead. You can read more about pooling in MyDAC Help (TCustomDAConnection.Pooling).
The article that describes how to use pooling was added in MyDAC 5.

i HAve the same

Posted: Thu 12 Apr 2007 15:08
by iad
i'm getting in both DBS 2006 and 2007.
ReceiveHeader : Net packets out of order : received[0], expexted[1]
this is mainly when i use Delete SQL and in Disconnect mode
it's very hard to reproduce but for sure there is a problem here and it very annoying.

Posted: Fri 13 Apr 2007 11:24
by Antaeus
I could not reproduce the problem.
Please try to make a small application that demonstrates it and send it to me at evgeniyD*crlab*com; include script to create and fill table.

Also supply me the following information:
- exact version of MyDAC. You can see it in the About sheet of TMyConnection Editor;
- exact version of MySQL server and MySQL client. You can see it in the Info sheet of TMyConnection Editor.

Posted: Fri 13 Apr 2007 12:01
by iad
this become a standard answer guys,
we are you customers not your QA team.
if i could reproduced it each time i would send it already but not, we are handling very complex systems so put an application is not feasible.
couple hints:
1. it happened when i try to delete from already empty table ( no all the time)
2. this is happening in Execute command in TMYQuery
3. it's not happening in version 4

thanks for understanding.

Posted: Fri 13 Apr 2007 14:02
by Antaeus
It is unlikely that records deleting causes this problem. As a rule, such problems arise on the previous step (a complicated query, or a stored procedure that return more than on resultset). The current step only indicates it.

Posted: Fri 13 Apr 2007 14:34
by iad
it happened to me on startup of the system, no query before.
also it happened in disconnect mode only.
i didn't see it in non disconnect mode