# Data upload to client locks it up

**URL:** <https://forum.inductiveautomation.com/t/data-upload-to-client-locks-it-up/20859>\
**Category:** Ignition\
**Created:** [November 14, 2018, 4:58pm UTC](https://forum.inductiveautomation.com/t/data-upload-to-client-locks-it-up/20859 "2018-11-14T16:58:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WChester](https://avatars.discourse-cdn.com/v4/letter/w/df788c/32.png) [@WChester](https://forum.inductiveautomation.com/u/WChester)\
**Post date:** [November 14, 2018, 4:58pm UTC](https://forum.inductiveautomation.com/t/data-upload-to-client-locks-it-up/20859/1 "2018-11-14T16:58:25Z")

</div>

I cannot share much detail but here is a summary.  
There is a process where I need to upload csv files with up to 3000 lines, 65 columns and then add to a mySQL database. The general process I use is this:

- search target folder for files

- check to see if the sn is included in a separate database (same as below) and

- get static info ie sn , process run,special config from a separate database

- get columns from the target data base

\*construct update query from this info

- read the csv file from a string (path and filename has already been constructed)

- split the string into lines

- iterate through the lines

\*split the current row

- build the new row using append

- run an update query to insert this data into the target database

- when finished start on the next file until all files are uploaded

The script I use works fine and I’m reasonably happy with the speed, the only problem is that when I start running the event script the user interface is locked and won’t respond until this script is done. I would like to have some way to monitor the progress of this process, but it won’t let me until it is completed. Is there any way to do this?

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [November 14, 2018, 5:09pm UTC](https://forum.inductiveautomation.com/t/data-upload-to-client-locks-it-up/20859/2 "2018-11-14T17:09:53Z")

</div>

This may be relevant:

> [@Update GUI via Asynchronous thread](http://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666):
>
> I’ve got a script I am experimenting with that can take a lot of time to execute, so I now use the system.util.invokeAsynchronous to run the script in a separate thread to keep the GUI from locking up. I am using the asynchronous thread to copy files from one place to another, and I would like to show the progress of the file copy with a progress bar. How would I go about this? I am importing a few python libraries to do this. import shutil def fileTransfer(): path = system.file.openFile() …

---

<div class="post-metadata">

**Author:** ![WChester](https://avatars.discourse-cdn.com/v4/letter/w/df788c/32.png) [@WChester](https://forum.inductiveautomation.com/u/WChester)\
**Post date:** [November 14, 2018, 5:36pm UTC](https://forum.inductiveautomation.com/t/data-upload-to-client-locks-it-up/20859/3 "2018-11-14T17:36:01Z")

</div>

I believe this is exactly what I am looking for 😀
