0

I have a DataSnap Server running as a Windows Service and it listens for connections on port 8080.

I am seeing the following errors in the DSServer.OnError event:

TDBXError - Invalid command handle: 2

and

TDBXError - Invalid command handle: 1

These errors happen several times during the day (For example, during one day it happened 36 times)

I've searched on the internet a possible reason for these errors to happen, but without luck.

What does this error mean? My datasnap client classes are up to date.

The Delphi Version I am using is Seattle.

  • 1
    If you search the DBX `.pas` files (I'm searching XE2, not Seattle), then you find the error is the constant `SInvalidCommandHandle`. If you search for that, you will see it is only used in `C:\...\source\data\datasnap\Datasnap.DSCommonServer.pas`. If you look where it is used, you will see several DBX commands have a `Message` param, which includes a handle. If it thinks the handle is valid, it tries to use it. Are you freeing any objects in your code in a way that doesn't properly cleanup everything, so DBX still thinks the object is valid when it really isn't? Seeing your code would help. – James L. Mar 07 '17 at 17:48
  • Thanks for the tip @JamesL. I'll check the file you mentioned and double check my code for objects that aren't being cleaned up correctly. – Luiz Grillo Mar 09 '17 at 12:12

0 Answers0