Quick Objects Documentation Akal Tech Logo
Configuring Templates To Generate Code

Glossary Item Box

Starting v4.0 the Quick Objects Designer now allows you to configure multiple templates to produce any kind of code, text, html, or xml etc.  

The following screen shot shows the "Template Configuration" area on the "File Paths" tab under the Project Properties.


EnlargeClick to enlarge

 

The included templates are by default placed in the {Install Directory}\NET20\BIN\Templates folder. The provided templates can be used to generate various types of code and these can also be used as samples to build custom templates.  If you need further information or help in creating custom templates for your needs please contact us. The following templates are included:

Templates that produce C#

 

Templates that produce VB.NET

 

Templates that produce XML (To be used with the WebXmlForm component)

 

The templates can executed in two ways. One method is to execute the template for each Table, View or Stored Procedure and results in creating one file each corresponding to the Table, View or Stored Procedure.  The other method is to execute the template once and hence the template will handle All Tables, Views or Stored Procedures. Various execution modes available are explained below:

  1. ForEachTable  (Only use with Table_Name*.template as these templates will create one class/file for each Table that is enabled.)
  2. ForEachView  (Only use with View_Name*.template as these templates will create one class/file for each View that is enabled.)
  3. ForEachProcedure  (None of the provided templates use this mode. However this can be used with any custom templates that need to produce one file per active procedure.)
  4. AllTables  (None of the provided templates use this mode. However this can be used with any custom template that need to produce one file for all active tables.)
  5. AllViews  (None of the provided templates use this mode. However this can be used with any custom template that need to produce one file for all active views.)
  6. AllProcedures (Only use with Procedure*.template as these templates will create one file that will contain all active procedures as methods)

 

Lets consider the example settings below demonstrating how to setup a template for a certain type of execution and output.

 

Once the templates are configured, the Generate menu is populated with the templates that are enabled as shown in the screen shot below.


EnlargeClick to enlarge