Normal Topic Sesame Encounters problem Frequently (Read 1098 times)
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Sesame Encounters problem Frequently
Oct 7th, 2011 at 5:51pm
Print Post Print Post  
Lately I am getting quite frequently the following flag:

"Sesame.exe has encountered a problem and need to close. We are sorry for inconvenience. If you are in the middle of something, the information you are working on might be lost"

On hitting close button, the client shuts down and the record working on loses the latest change.

I believe, this has to do with memory related issues. I have 4 GIG of operating memory. I am still using Windows XP with service pack3.  Also this happens when I attempt to save the record and there is extensive error checking on exit and quite a bit of posting using xResultset commands. Also most of the time, before saving the record, I have to open up MS word to print certain data using using mergefileprint () command.  If I do not do that, I am least likely to encounter this problem.

Why this problem? What can I do to get rid off this.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Sesame Encounters problem Frequently
Reply #1 - Oct 7th, 2011 at 6:13pm
Print Post Print Post  
Hello Bharat,

When you have a moment from your client system, could you send the s2_log0000.log file and the Windows Application and System logs to support@lantica.com

To view and save the Windows logs
Click Start
Choose Control Panel
Choose Administrative Tools
Choose Event Viewer
On the Left click on Application
Click Action->Save Log File As
Give it a name such as Bharat_Application_Log.evt
Click Save
Do the same for the System log

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Sesame Encounters problem Frequently
Reply #2 - Oct 7th, 2011 at 8:10pm
Print Post Print Post  
I have also noted that when Immunization is given, on exiting form, it is required to post in Inventory file and that is where error shows up sometime. I am showing my code here:



===================

On Exit


//var vLoop as int
var vLot as String
var vCode as String
var vDescription as String
var vManufacturer as String
var vExpDate as String
var vQuantity as Int
var vProc as String
var vCombvaccine as String

var vVaccineCode as String


var vList as String
var vImmEntry as String



Subroutine IndividualVaccine (vstring as String)

var vLoop as Int
var vRSHandle as Int
var vNoOfRecords as Int
var vNDC as String
var vVISDate as String


vRSHandle = @XResultSetSearch(@FN, "Inventory", SEARCH_MODE_AND, SEARCH_SYNTAX_QA, "!QAH=>0", "!ExpDate=>" + (@Date-1), "!VaccineCode=" + vString)
           if(vRSHandle > -1)
           {
                 vNoOfRecords = @XResultSetTotal(vRSHandle)
                 //WriteLN ("Total Records: " + @Str (vNoofRecords))
                 XResultSetSort (vRSHandle, "ExpDate:-1")
                 //for vLoop = 1 to vNoOfRecords
                             XResultSetCurrentPosition(vRSHandle, 1)

                 
                             
                             vCode = @XResultSetValue(vRSHandle, "VaccineCode")
                             //WriteLN ("This is vCode Value: " + vCode)
                             if vCode = vString then
                                   {

                                         vDescription = @XResultSetValue(vRSHandle, "Description")
                                         vNDC = @XResultSetValue(vRSHandle, "NDC")
                                         vManufacturer = @XResultSetValue(vRSHandle, "Manufacturer")
                                         vLot = @XResultSetValue(vRSHandle, "LotNumber")
                                         vExpDate = @XResultSetValue(vRSHandle, "ExpDate")
                                         vExpDate = udf_formatDate (vExpDate)

                                         vVISDate = @XResultSetValue(vRSHandle, "VISDate")
                                         vVISDate = udf_formatDate (vVISDate)


                                         vQuantity = @XResultSetValue(vRSHandle, "QAH")
                                         vQuantity = vQuantity - 1
                                         xResultsetValue (vRSHandle, "QAH", vQuantity)

                                         If vImmEntry = "" then
                                               {

                                                     vImmEntry = vDescription +", " + "NDC: " + vNDC + ", " + "Manufacturer: " + vManufacturer + ", " + "Lot#: " + vLot +  ", " + "Expiratory Date: "  + vExpDate +
                                                     ", " +  "VIS Date: " + vVISDate
                                               }
                                               Else if vImmEntry <> "" then
                                               {
                                                     vImmEntry = vImmEntry + @NewLine ( ) + vDescription +", " + "NDC: " + vNDC + ", " + "Manufacturer: " + vManufacturer + ", " + "Lot#: " + vLot +  ", " + "Expiratory Date: "  + vExpDate +
                                                     ", " +  "VIS Date: " + vVISDate

                                               }


                                         //WriteLN (vDescription +", " + "Manufacturer: " + vManufacturer + ", " + "Lot#: " + vLot +  ", " + "Expiratory Date: "  + vExpDate)
                                         //vProc = Proc
                                         
                                   //      vProc = @Del (vProc, @In (vProc, vCode), 1)
                                         //WriteLN ("Remaining Procedure Codes: " + vProc)                  
                                   


                                   }
                             //vLastName = @XResultSetValue(vRSHandle, "Last")
                             //WriteLn(@Str(vLoop) + " Of " + @Str(vNoOfRecords) + "      First: " + vFirstName + " Last: " + vLastName)
                       
                 //next
                 XResultSetClose(vRSHandle)
           }



End SubRoutine





If  @IsNew and DN <> "" and Not @IsBlank (IMM) and Not @ISBlank (D1) then   //Last Three conditions are to prevent misfiring

     {



           
           vList = @XListValues (@FN, "Inventory!VaccineCode")
           //writeLn (vList)
           
           for n = 1 to @Len (vProc)
                 vVaccinecode = @Mid(vProc, n, 1)
                 If @FindStringArray (vList, vVaccineCode) > 0 then
                       {
                             IndividualVaccine (vVaccineCode)
                             //WriteLN ("You were Here")
           
           
                       }
           
           
           
           Next
           If @In (IMM, vImmEntry) < 1 then
                 {

                       IMM = IMM + @NewLine ( ) + vImmEntry
                 }
           PrintLabOrder (vImmEntry)     //This routine is in Global Code

     }


================================================

Subroutine below is posted from GlobalCode:



Subroutine PrintLabOrder ( vString as String)
var vFont as String = " Times New Roman"
var vFontsize as Int = 17
var vDiag1 as String = @Right (cond1, 6)
var vDiag2 as String = @Right (cond2, 6)
var vDiag3 as String = @Right (cond3, 6)
var vName as String
var vAddress as String
var vDate as string
var vMedicareNumber as String
var vMedicaidNumber as String
var vEx as String
var vBD as String
var vSex as String
var vAge as String
var vPhone as String
var vCopy as Int = 2
var n as Int
//var vPrinter as String = "\\Vital\HP5L"
var vPrinter as String = @GlobalValue ("PrintLab")
//var vPrinter as String = "DocuCom PDF Driver"

var vImm as String



For n = 2 to 10
     SetThisElement ("D" + @str (n))
     If vImm <> "" then
           {
                 if ThisElement <> "" then
                 {
                       vImm = vImm + ", " + ThisElement
                 }      
           }
           Else
           {
                 vImm = ThisElement
           }
     UnsetThisElement ( )
     next





vAddress = @xlookup (@FN, RecNumber, "Index!RecNumber", "Address") + ", " +
@xlookup (@FN, RecNumber, "Index!RecNumber", "City") + ", " +
@xlookup (@FN, RecNumber, "Index!RecNumber", "ST") + " " +
@xlookup (@FN, RecNumber, "Index!RecNumber", "Zip")


vName = @xlookup (@FN, RecNumber, "Index!RecNumber", "P_LastName") + ", " +
@xlookup (@FN, RecNumber, "Index!RecNumber", "First") + " " +
@xlookup (@FN, RecNumber, "Index!RecNumber", "MI")

vDate = @Mid (date1, 6,2) + "/" + @Right (date1, 2) + "/" + @Mid (date1, 3, 2)
vBD = @Mid (BD, 6,2) + "/" + @Right (BD, 2) + "/" + @Mid (BD, 3, 2)

vSex = @Left (Sex, 1)

If @in (Age, "Years") > 0 then
     {
           vAge = @Replace (Age, "Years", "Y")
     }
     Else If @in (Age, "Year") > 0 then
     {
           vAge = @Replace (Age, "Year", "M")
     }
     Else If @in (Age, "Months") > 0 then
     {
           vAge = @Replace (Age, "Months", "M")
     }
     Else If @in (Age, "Month") > 0 then
     {
           vAge = @Replace (Age, "Month", "M")
     }


If Ins1 = "M" then
     {
           vMedicareNumber = RecNumber
     }
     Else
     {
           vMedicareNumber = ""
     }

If Ins1 = "P" then
     {
           vMedicaidNumber = RecNumber
     }
Else if Ins2 = "P" then
     {
           vMedicaidNumber = @xlookup (@FN, RecNumber, "Index!RecNumber", "ID2")
     }
     
If vMedicaidNumber <> "" then
     {
           vMedicaidNumber = vMedicaidNumber + @xlookup (@FN, RecNumber, "Index!RecNumber", "Chart")
     }

vEx = @xlookup (@FN, RecNumber, "Index!RecNumber", "vEx")

vPhone = @xlookup (@FN, RecNumber, "Index!RecNumber", "Phone")
     
    For n = 1 to vCopy      

     RestoreDefaultPrinter()
     AlternateDefaultPrinter (vPrinter)
     NewPage (850, 1100)
     PrintPagePaper (28)
           //value, xpos, ypos, coln width, Font, Fontsize, Measureonly, Alignment
     
     PrintString (vString, 45, 25, 0, vFont,12,  0)
     If Tine <> "" and (@IsBlank (D2) or @IsBlank (D3) ) then
           {
                 PrintString (Tine, 45, @PageExtentY ( ), 0, vFont,vFontsize,  0)
           }
     
     PrintString (vImm, 45, @PageExtentY ( ), 0, vFont, 12,  0)      
     
     PrintString (vDiag1, 478, 120, 0, vFont, vFontsize, 0)
     PrintString (vDiag3, 600, 120, 0, vFont, vFontsize, 0)
     PrintSTring (DN, 135,135, 0, vFont, vFontsize, 0)
     PrintString (vDiag2, 478, 135, 0, vFont, vFontsize, 0)
     PrintString (vName, 35, 245, 0, vFont, vFontsize, 0)
     PrintString (vBD, 488, 245, 0, vFont, vFontsize, 0)
     PrintString (vAddress, 50, 275, 0, vFont, vFontsize, 0)
     PrintString (vAge, 25, 310, 0, vFont, vFontsize, 0)
     PrintString (vSex, 80, 310, 0, vFont, vFontsize, 0)
     PrintString (vDate, 260, 310, 0, vFont, vFontsize, 0)
     PrintString (@Time, 435, 310, 0, vFont, vFontsize, 0)
     PrintString (vPhone, 100, 340, 0, vFont, vFontsize, 0)
     PrintString (vMedicareNumber, 70, 415, 0, vFont, vFontsize, 0)
     PrintString (vEX, 250, 415, 0, vFont, vFontsize, 0)
     PrintString (vMedicaidNumber, 310, 415, 0, vFont, vFontsize, 0)
     PrintString (Lab, 112, 810, 700, vFont, vFontsize, 0)
     FinishPage( )
     RestoreDefaultPrinter()

  Next


End SubRoutine



========================


Thanks,
Bharat



  
Back to top
 
IP Logged