This file contains the TnxMTOptionMonitor-component - a component to set user defined session-options.
This is useful if you need values in SQL which are different per client or per server of your application - for example the time zone.
You can query these values with the build-in OPTION()-function
(e.g. SELECT OPTION('timezone') FROM #DUMMY)
If you connect the component to a TnxRemoteServerEngine you can set the option per client.
If you connect the component to the TnxServerEngine you set the options per server.
There are different types of options (listed below) - but you can easily define your own.
The component is completely included in the NexusDB-settings mechanism, so the option-values are stored with the default-storage mechanism and if you include the component in the nxServer, you can manage the settings via the web-administration.
The file contains two demos:
One simple client-demo, where you can see how to use the component at client-side.
The other demo contains a package, with a derived component with a predefined TimeZone-option. If you drop the component to the dmServer of the nxServer-project you can see how to manage the values per web-interface.
(This works not totally as expected - I think the reason is that the web-interface don't show list-values by now.)
And you can query the value in the Enterprise-Manager with
SELECT OPTION('TimeZone') FROM #DUMMY
Compile the package and install it in the IDE. The you can use the TnxMTOptionMonitor-component.