SQLApptFields      

 

Below is an example of the field names when external names are used in the dictionary and you are using the default [  ]  characters for MS SQL append and prepend characters.

 

BSTExtNames

 

 

! Embed Point of Day Before Bookings SQL Statement.****

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

     ' SYSID, DATE_, TIME_, DURATION, CUSTOMERID ' &|

     ' , CONTACT, ADDRESS_, PHONENUMBER, EMPLOYEEID, EMPLOYEECODE ' &|

     ' , APPMNTTYPE, NOTES ' &|

     ' FROM ' & 'BSAPTDAT' & ' ' &|

      ' WHERE ' &|

      ' EMPLOYEEID = <39>' & CLIP(SQLID")&'<39> AND ' &|

      ' DATE_ BETWEEN <39>' & Format(SQLDateStart#,@D10-)&'<39> ' &|

      ' AND <39>'& Format(Bs:UseDate + 1,@D10-)&'<39> ' &|

      ' ORDER BY  EMPLOYEEID asc, DATE_ asc, TIME_ asc '

! Embed Point of Day After Bookings SQL Statement.****

 

 

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