M.Ammar Posted January 9, 2019 Share Posted January 9, 2019 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 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 9, 2019 Share Posted January 9, 2019 Hi, http://unigui.com/doc/online_help/handling-concurrency.htm ... 1 Quote Link to comment Share on other sites More sharing options...
M.Ammar Posted January 9, 2019 Author Share Posted January 9, 2019 45 minutes ago, Sherzod said: Hi, http://unigui.com/doc/online_help/handling-concurrency.htm ... 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 Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 9, 2019 Administrators Share Posted January 9, 2019 Hi, No, it's the worst practice. Please use Mainmodule for this purpose, or put query components directly on related forms. Quote Link to comment Share on other sites More sharing options...
M.Ammar Posted January 9, 2019 Author Share Posted January 9, 2019 1 hour ago, Farshad Mohajeri said: Hi, No, it's the worst practice. Please use Mainmodule for this purpose, or put query components directly on related forms. 1 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.