Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can toolbar/Menu code read from an SQL Database
#1
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
#2
Try these classes and functions.

Database
Sqlite
ICsv
DynamicToolbar
DynamicMenu
newitem

I don't have sample code.
#3
Gintaras, Thanks for the advice, I will look at those classes and functions and see if they will accomplish what I am trying to do.

Do the forum rules allow users to post solicitations for paid work? I might need assistance with this project, it may become too large for me to handle alone and I would benefit from someone who has done similar work in the past .

Can you let me know if the software can be licensed for use in a commercial application? I am considering using my toolbar in a commercial hosted software service that may have dozens or hundreds of users. I read the license agreement and I believe my intended future usage scenario is not covered in the Quick Macros license; can you let me know how my proposed usage would be handled from a licensing standpoint?

Thanks
#4
Quote:Do the forum rules allow users to post solicitations for paid work?
yes.

Quote:Can you let me know if the software can be licensed for use in a commercial application?
Quick Macros cannot be used in other applications. Or each user of that application would have to buy a QM license. But I don't recommend it.

QM2 itself is no longer developed, except bug fixes and adaptations to new Windows etc versions. Its successor will have a free .NET library that also will have similar toolbars, and the toolbars will be more flexible, can be created at run time, for example from a database.
#5
Quote:QM2 itself is no longer developed, except bug fixes and adaptations to new Windows etc versions. Its successor will have a free .NET library that also will have similar toolbars, and the toolbars will be more flexible, can be created at run time, for example from a database.

Do you mean you're working on QM3 with this library or a similar product that will replace QM.

Thanks,
-dana
#6
Both are true. Which one will be more true - still unknown.


Forum Jump:


Users browsing this thread: 1 Guest(s)