Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Micros 3700 sim db connection - separate sim

Status
Not open for further replies.

POSADM

Technical User
Apr 24, 2008
19
US
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

Code:
sub vipDiscount
    // Do Stuff
endsub

Does this help, or make sense?
 
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.
Code:
string1=Test1
string2=Test2
string3=Test3
num1=Number1
num2=Number2
num3=Number3

It's not the greatest way, but can get the job done. Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top