Hello. Recently, we've been having trouble with a particular function causing clients to crash frequently. The function is supposed to let the user import a CSV file that will automatically generate new records with associated parts list subrecords based on the imported data. Out of the 3 times we've used the function, it has ran to completion once. Every other time, the client window locks up and freezes after the user has selected a file, while it is adding records, causing the client to crash to desktop with the user losing all of their work. Both the client and server are on the same local network, running Windows 10 and Sesame 2.6.4, and have a fair amount of RAM available (8gb+).
Since the function itself is quite lengthy, here is the rough pseudocode:
>User chooses directory of CSV file >Import CSV file, format data, remove any headers >While unread data remains { >Create new record in main form, fill in fields n = @FormNewRecord( vForm ) Company = Split( vRecord, "," ) >While unread part data remains { >lookup part information from another database vPartData = @XLookupSourceListAll( @FN, vPartNo, "Parts!Part_No", vSrcList ) >create new record in subform, add data and do price calculations i = @FormNewRecord( vSubform ) FormFieldValue( vSubform, "Manufacturer", i, @AccessStringArray( vPartData, 1 ) ) >commit subform after adding record FormCommit( vSubform ) } >commit main form after all subform parts have been added FormCommit( vForm ) } >display any error messages generated during import
More details are available in the attached file.
While I suspect it has something to do with the nested while loops, we have had similar issues in the past with functions that add or delete many records in subfields at a time. Could this be a memory issue? Could a fluctuation in connectivity between client and server cause this? If you have any insight or further questions, let me know. Thank you, -Alec
|