Jump to content

Firedac query On UniServerModule, is it best practice?


M.Ammar

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
 

Link to comment
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

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...