Function LoadUItoMemory() As Boolean
Dim tmpResult As Boolean=false
dim tmpUIFileName as new FolderItem
gUIConnection = New REALSQLDatabase
#if DebugBuild then
tmpUIFileName =GetFolderItem(app.ExecutableFile.Parent.Parent.AbsolutePath +cashierxtra.gcntuifilename)
#else
tmpUIFileName =GetFolderItem(app.ExecutableFile.parent.AbsolutePath + cashierxtra.gcntuifilename)
#endif
gUIConnection.AutoCommit=true
if gUIConnection.connect Then
call gUIConnection.Attachdatabase(tmpUIFileName,"tempdb","***EncryptKey***")
if gUIConnection.Error=true then
return false
end if
gUIConnection.SQLExecute ("CREATE TABLE UIFormat AS SELECT * FROM tempdb.UIFormat")
if gUIConnection.Error=true then
return false
end if
gUIConnection.SQLExecute ("CREATE TABLE UILanguage AS SELECT * FROM tempdb.UILanguage")
if gUIConnection.Error=true then
return false
end if
gUIConnection.SQLExecute ("CREATE TABLE UIImage AS SELECT * FROM tempdb.UIImage")
if gUIConnection.Error=true then
return false
end if
gUIConnection.SQLExecute ("DETACH tempdb")
if gUIConnection.Error=true then
return false
end if
tmpResult = True
End If
Return tmpResult
Exception Err
CatchErrorType(Err,CurrentMethodName)
return false
End Function