SqlSettings

 

You can Choose to Use BST Prop:SQL or not and substitute calls made by the templates.  This depends what Template Chain and What Back end you are using.  For Example, often the ABC Chain and MSSQL do not need to use it at all, and operates very fast just using the Standard templates.

 

If you have used the dictionary Synchronizer and imported the files from the back end into the Clarion dictionary, you do not need to check the boxes for file or external field names.  The file(table) name and field names in the dictionary will be the same as the ones used in the SQL tables.

 

If you generated the back end from the dictionary using any of the various 3rd Party tools available, then you may need to check the boxes.

 

If you have SQL table names different than the file names used in the dictionary, then you have to check the Use File "Names" so the template has knowledge to use the correct table name in constructing the Prop:SQL statements.

 

If you are using external field names for the SQL tables that are different than the field names used in the clarion dictionary, you will need to check the Use "External Field Names" so the template has knowledge to use the correct Field names in constructing the Prop:SQL statements.

 

The Prepend and Append Characters default to those used for MSSQL and you will need to change them if your backend uses something else.  Caution: If you change the default characters, you need to go into The resource file and the appointment file and click on the Reset/Load Fields Button to reload the corrected external field names.

 

This code example shows a mix of regular field names, and some external field names.

 

BS_WorkOrder{PROP:SQL}='SELECT ' &|

'BS_WorkOrder_PK, BS_FK, People_FK, [Location_FK], [Copy]' &|

', [Status], [ServiceLocation], [Received], [Due], [DueDescription]' &|

', [ServiceDescription], [Canvas_Work], [Name_Work], [Upholstery_Work], [COD]' &|  ...etc

 

There is a checkbox if you are using the DateTime "overed" field in your dictionary and using it as the key.

It is the developers responsibility to see this is set up correctly and the update form is constructed to work properly with the overed fields.  BST Prop:SQL will construct the statement correctly to use this field to load appointments and reminders as thus:

 

In this example "Start" is an external field name for a DateTime Field in MSSQL.

 

' WHERE'&|

' [Start] BETWEEN <39>' & Format(BST:MonthStartDay4,@D10-) & ' 00:00:00.00<39>' &|

' AND <39>'& Format(BST:MonthEndDay4,@D10-) & ' 23:59:59.99<39>' &|

' ORDER BY [Start]'

 

My "Where" Additions is for adding additional filtering to the Resource or Appointment file when retrieving records to display in the BST Grid.

 

Replace Select * with Field Names will generate a Prop:SQL using all the field names in dictionary order, unless you change/delete them in the buttons below that.

 

Resource File aka EMPLOYEE in this case.

Appointment/Reminder File aka BSAPTDAT in this case.