Helpful Information
 
 
Category: Delphi Programming
ADO problems

Hi
I hope someone can help me!
I have a client server application on which the server accesses the database using ADO!
However, there is a problem!
The server doesnīt seem to send all information to the database - sometimes the data is lost! There seems to be some concurrency problem!
Has anyone had this problem before?
I have code if anyone wants to see

Thanks in advance
:confused:

Please post the relevant code including what you expect to see and what is being returned instead.

Simply I have created 2 component queries
ADOQuery1 := TADOQuery.Create(self);
ADOQuery1.Connection := conexionBD;

ADOQuery2 := TADOQuery.Create(self);
ADOQuery2.Connection := conexionBD;
which I use to send to the server.
However, I have lots of clients who connect to the server via http. So these clients could send data at the same time. However, the adoqueries donīt seem to be able to handle this. I am thinking about creating an array of queries, so that a client can use a free one. But this is not the way it should work. There should be ONE adoQuery on the server for many clients and this ADOQuery should be able to handle concurrency. I have been looking on ADO help but canīt really find anything. Do you know of any ADO properties that allow this to happen?
Thanks:confused:

Let me get this straight... you have two query objects and when a client connects, you use the query objects to retrieve data from the database. Here's the big problem then:

When you run a query, if the result set is large, the query is not returned to the client all at once. One way to retrieve all of it back is to use the Last method to move to the last record in the result set. However, if you're in a multiuser environment, this is not a good idea, esp. if there's a chance that another client can connect before you retrieve all your results.

Best way to handle this would be to create a query object dynamically, when a client connects and destroy it after the client disconnects.










privacy (GDPR)