Jump to content

Multiple Datamodules


surensiddhi

Recommended Posts

There is no problem using MainModule with multiple datasets, tables etc. and also no problem using datasets in forms as well. If all datasets are placed in MainModule, it is difficult to maintain.

 

In large projects it is necessary to categorize datamodules based on natures of datasets like DatamoduleLookup, DatamoduleCRM etc.

How can it be done in UniGUI ? When created datamodules  as normally done in  Delphi  did not work. Enven using uniGUI wizzard to create datamodule, it did not work.

 

I am sure it must be possible. If some one has sample code, please shared. It will be highly appreciated

Link to comment
Share on other sites

What do you mean exactly that it doesn't work?  If you mean it doesn't work in the respect of the global instances/references that is created by the IDE in a normal single user application then yes, that way of creating them doesn't work because it cannot work.  Or at least, not just as naievely as with a single user application.  Instead, you just need to create your objects (datamodules included) as needed from withing the main module.  Remember that with a normal Delphi application you have essentially one user and one main thread of execution, so having a bunch of global datamodules and forms (even though that's actually dubious IMHO) can work.  But with a UniGUI server you're serving multiple users, so to keep everyone out of each others hair you can't rely on single globally created instances for most things.  

Link to comment
Share on other sites

  • 1 year later...

Applicstion Datamodules created from unigui wizard should work normally. They are created for each session separately.

 

Hello, unigui datamodules are created automatically for each session? or the datamodules must be created manually in the MainModule unit? Tks

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...