Multi clients error

I build a server following the document and it works fine on single client.
Then I test it on multi-clients, every client executes a select query and close, loops 10000 times, few seconds after the 2rd client starts, an error message displayed like this:

Server-side error while retrieving data:
ReceiveHeader: Net packets out of order: received[0], expected[1]

0 or 1 are random numbers.

where is the wrong thing?
Sorry for my poor English.

And it seems the server just put the error directly to the clients, my server code can't catch the error, how can I deal it on server side? 


what is your client doing, exactly (code)? By multiple clients you mean multiple executables? All running  at once? Or is it multiple threads in a single exe? One executing after another? All at same time? It's not clear to me how your client test works.

What components are you using for db connection? Can you use same client code you're doing without RemoteDB, using the components directly?