Open cpyrgas opened 3 years ago
This is by design: Each thread has its own workareas and its own list of alias - area number - rdd objects.
So there's no way to make something like this work? By somehow sharing workareas among threads and changing the code in the DBServer class itself?
This makes it impossible to use DBServer with a BackgroundWorker, the problem Bernhard reported (I have pointed him to this ticket)
Impossible ? No. Difficult yes. The current design of the DbServer class uses the area number and alias internally. In the background thread these alias and number have no meaning. If it would use the RDD object then it would be easier. I'll see if we can redesign the DBServer class for this purpose.
Robert
This is the same purpose I had for my CoreDBF class.... maybe it could be a starting point. CoreDBF.zip
The following code tries to access a DBServer object from a different thread, than the one in which it was created, but it does not work, DBServer:Used returns FALSE and no db action can be performed on it. I guess this happens because the alias cannot be found in the new thread.