Jump to content
uniGUI Discussion Forums
Sign in to follow this  

Firedac query On UniServerModule, is it best practice?

Recommended Posts

Hi all, 

I Want to know if it is a best practice to add and run a Firedac query on the UniServerModule, that Query calculate and adds some records to some tables in MSSQl Database, at a certain time of the day, this needs to be done even if no User is using the application that's why I can't think of another way to do it, and if Not then what is the best way to do that.

I also want to send a notification to freeze or close client sessions during that operation, all users will be familiar with the daily time of this operation, any help or information will be appreciated.
Thanks and Best Regards

Share this post

Link to post
Share on other sites
45 minutes ago, Sherzod said:

Thank you Sherzod for your quick reply, I have read this document, but I am still not sure if it is safe to use the server module as I described, knowing that no user will be using this query or accessing this data, will that make it ok to do it like that? 

thanks again

Share this post

Link to post
Share on other sites
1 hour ago, Farshad Mohajeri said:


No, it's the worst practice. ^_^

Please use Mainmodule for this purpose, or put query components directly on related forms.


thank you for reply, I understand it is worst practice if users are to access the data, but this case no one is accessing the query, it will run automatically at a certain time to add some records, I am new at this but as I understand the mainmodule is opened in user sessions and may not be opened by any user at the time that I want to run this code, please read my question again. how can I run code at a certain time say 12 am every day even if all users are not using the application. 

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this