/ Forums / Advansys Formativ / Formativ Creator / Best way to import & save applet data / Reply To: Best way to import & save applet data

#5549
Support 3
Participant

We highly recommend not to update the applet source when its running. Saving the config related data (i.e user name, password, etc) into applet source also not a good idea for the security reason.

May be you can consider to save the config data into an INI file and encrypt sensitive data using a 64 bit DES encryption algorithm. See the utilities.DESEncryption method in Formativ language Guide to encrypt and decrypt data. Here is an example to use the ini file:

  
set oIniFile = TIniFile.Create(Utilities.UserConfigDirectory + "Myconfig.ini")
iUserName = oIniFile.ReadString("Settings", "Name", "")
iID = oIniFile.ReadInteger("Settings", "ID", 1)
iType = oIniFile.ReadBool("Settings", "ExternalUser", false)

call oIniFile.WriteString("Settings", "Name", iUserName)
call oIniFile.WriteInteger("Settings", "ID", iID)
call oIniFile.WriteBool("Settings", "ExternalUser", iType)

In order to open MS Excel in background, please refer to Microsoft Excel Object Model Guide. The url below shows some example to use the Excel in VBS.
http://www.microsoft.com/technet/scriptcenter/resources/qanda/dec05/hey1215.mspx

Hope this helps.

Regards,
Advansys Support