03-11-2017, 08:04 PM
I guess I am asking a general question, then if what I propose is possible, does anyone have any sample code/functions that would work as a framework for accomplishing this?
I am trying to make a toolbar and set of menus that will be defined by values that are stored in a SQL Database table. Can QM read data from specified database tables that would then dynamically create new QM code to be used for creating a toolbar and menu? I want to deploy a toolbar on remote desktop session on a remote server, and have this toolbar configure itself based on values that I store in database tables. QM would be installed on the server (Windows Server 2012 or 2008 R2) so each remote desktop session environment would be similar to a windows pc (we can install QM, or run it portably). When the user logs in, QM would be launched and then read a specified database table (I would program into QM the SQL database instance, username and password or we can read them from the database based on the windows user account name). I would then make a database table that would define the toolbar and its menus.
If I am able to manipulate QM code by reading values from a database, then I believe this would be possible. The database table and its data values would be set ahead of time using a SQL Management Studio, that is how I would customize the toolbar for each of the users. Then each instance of QM would need to read the user account name of the remote session - that would define which records are to be read from the database by QM to customize the toolbar & menus.
This sounds complicated, but if there are standard functions that can read values from database tables and use those values to define QM code, then the whole toolbar and its various menus can be customized for an unlimited number of users. After a configuration is loaded into the database for each user account, the person can have access to their custom toolbar by simply logging into the server and starting QM.
I would appreciate any advice on how to accomplish this. I know that user configuration data could be stored in windows registry or even text files, but if I could use SQL it would make this concept very flexible since I am trying to deploy the toolbar on a software system that is driven by an SQL database to start with.
With the help of Gintaras I was able to take my very rudimentary toolbar and drastically simplify the code. I took most of the custom values in the toolbar and created a single function that defines 20 or more global variables, then my menu items use these global variables. I hard-coded the menu item labels, I would need those menu item labels (the button names) to be values that are stored in the SQL database.
Hopefully this can happen, I would welcome any suggestions on how to create a dynamic toolbar and menu that can be pre-defined for multiple users and have standard QM code that reads the stored values and then creates the toolbar & menus accordingly.
Thanks
I am trying to make a toolbar and set of menus that will be defined by values that are stored in a SQL Database table. Can QM read data from specified database tables that would then dynamically create new QM code to be used for creating a toolbar and menu? I want to deploy a toolbar on remote desktop session on a remote server, and have this toolbar configure itself based on values that I store in database tables. QM would be installed on the server (Windows Server 2012 or 2008 R2) so each remote desktop session environment would be similar to a windows pc (we can install QM, or run it portably). When the user logs in, QM would be launched and then read a specified database table (I would program into QM the SQL database instance, username and password or we can read them from the database based on the windows user account name). I would then make a database table that would define the toolbar and its menus.
If I am able to manipulate QM code by reading values from a database, then I believe this would be possible. The database table and its data values would be set ahead of time using a SQL Management Studio, that is how I would customize the toolbar for each of the users. Then each instance of QM would need to read the user account name of the remote session - that would define which records are to be read from the database by QM to customize the toolbar & menus.
This sounds complicated, but if there are standard functions that can read values from database tables and use those values to define QM code, then the whole toolbar and its various menus can be customized for an unlimited number of users. After a configuration is loaded into the database for each user account, the person can have access to their custom toolbar by simply logging into the server and starting QM.
I would appreciate any advice on how to accomplish this. I know that user configuration data could be stored in windows registry or even text files, but if I could use SQL it would make this concept very flexible since I am trying to deploy the toolbar on a software system that is driven by an SQL database to start with.
With the help of Gintaras I was able to take my very rudimentary toolbar and drastically simplify the code. I took most of the custom values in the toolbar and created a single function that defines 20 or more global variables, then my menu items use these global variables. I hard-coded the menu item labels, I would need those menu item labels (the button names) to be values that are stored in the SQL database.
Hopefully this can happen, I would welcome any suggestions on how to create a dynamic toolbar and menu that can be pre-defined for multiple users and have standard QM code that reads the stored values and then creates the toolbar & menus accordingly.
Thanks