Has anyone separated the database connection call to its own sim? I have several sims that connect to db and although most are small enough to encrypt, a couple aren't and was hoping for a single sim for that.
If I am thinking on the same lines as you, you can just use an include 'sim.isl' in the header of the original calling SIM function to another sim file and encrypt it or not then.
For instance, lets say 'discount.isl' is the main sim. Within this SIM is the EVENT INQ : 3, with in this event is a Call to the 'sub vipDiscount', which has it's own isl file.
Code:
include 'vipdisc.isl'
// OTHER VARIABLES AND SUCH
Event INQ : 3 // VIP DISCOUNTS
Call vipDiscount
endevent
Yes that makes sense and routinely call events from other sims. However calling the db status and keeping those variables saved seems to be my problem. Even when using the RetainGlobalVar command. Getting as basic as possible… with one sim that only has the database connection info in it and one sim that has an event that calls the db connection sim. That works – meaning I can place a errormessage within the main sim and get active connection result. If I place any other subroutine call or loadkbmacro command in main sim event, it seems to skip the db connection and only do the other call or it does the db connection last.
Micros SIM variables are only retained once per session (or call). If a new call is made the variables are reset. The only option I have thought of to Retain variables would be to save them to a text file, and then recall them from that file.
For instance, the main sim can call a sub function to grab the data. By using = as a separator, you can grab anything left to it to set the variable as.
Say the info is saved in a file named: variables.txt, have the sub read it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.