<< Click to Display Table of Contents >> Callback Templates |
![]() ![]() ![]() |
The Server editor template has 4 sections for generating Callback code:
•CbClass The class declaration
•CbStart The start of the methods
•CbBody The body of the methods that gets repeated for every connection
•CbEnd The end of the methods
The following connection string code gets generated by the default template for a connection that is also the default connection:
METHOD Connectionstring (sName, uDefault) CLASS cConnCallback
LOCAL uRet AS USUAL
DO CASE
// Start of connection 'NORTHWIND' DO NOT REMOVE !!!
CASE sName == 'NORTHWIND'
uRet := "Provider=SQLOLEDB.1;Initial Catalog=Northwind;Data Source=(local).............."
// End of connection 'NORTHWIND' DO NOT REMOVE !!!
// Start of connection 'DEFAULT' DO NOT REMOVE !!!
CASE sName == 'DEFAULT'
uRet := "Provider=SQLOLEDB.1;Initial Catalog=Northwind;Data Source=(local).............."
// End of connection 'DEFAULT' DO NOT REMOVE !!!
OTHERWISE
uRet := uDefault
ENDCASE
RETURN uRet
The editor inserts special markers so it can find and update the different sections of the method later