Jump to content

datasource onchangedata


jmdoneva

Recommended Posts

When I create a new uniApplication through the wizard and take default (stand-alone server) it creates ServerModule, MainModule, Main and the program module. I have a unidbgrid and unicombobox in Main and tclientdataset, tsqltable, tdatasetprovider and tdatasource in the MainModule.  I query the tclientdataset through the tsqltable with the combobox. ie. changing the combobox requeries the tclientdataset through the tsqltable using its value as the parameter. All this works fine. But I also have a unipanel and unistatusbar that I change the caption on the unipanel and text in the unistatusbar panel as the user selects records on the unidbgrid through the tdatasource onchangedata event. This does not work. The only way to get it to work is to move the tdatasource to Main. The onchangedata event fires in either situation whether the tdatasource is in the MainModule or Main but the unipanel and unistatus will not respond to changes unless it is in Main.

But this causes another problem. I also have another set of data (tclientdataset, tsqltable,tdatasetprovider,tdatasource) that uses the original tdatasource as mastersource. All is still fine until I close the project then reopen and try to compile. I get an error that it is a bad link from the MainModule to Main. It wants me to select another but won't let me so I have to drop the link then recompile then go back to the MainModule and relink the mastersource again.

 

Am I thinking of the MainModule incorrectly. I am thinking of it like a Data Module. Should all the data components be somewhere else?

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