4
Good morning Personal,
I’d like to request some help from you, in case anyone can help I’m super grateful.
Doubt would be reasonably simple, how to work with Multi Thread in Firedac? In other databases, such as DBISAM, has a component for Sessions, just configure this component and everything is solved, but firedac does not have this component.
Explaining the case better:
I developed a REST Server in Delphi using Datasnap to export data from a database (Firebird) to mobile devices.
The connection to the database is made by the Firedac components. When I start the server I connect to the database, the connection is established until the server is closed.
Performing some tests I realized that when a device performs the requests everything works perfectly, however the problem arises when multiple devices make simultaneous connections, there are several errors, Access Violation and database errors.
To correct these errors, in each method requested on the server start a new connection to the database. By doing this errors no longer occur and I can connect several devices simultaneously. I know this is not the right way, I realized right at the beginning that the process has become VERY slow, because every request starts a new connection.
Then I would like to know how to work with sessions in Firedac, for each request on the server does not influence other connections.
Grateful from now on.
friend, post a generic response, it is difficult for people who access the site without account to ask your questions when you ask to contact to take the doubt.
– Paz
Hello, it is possible to post how you used the pool Connection?
– ViniFerrareze
Hello please post an example of the code so we can locate ourselves
– Danilo Araujo