I am using threads to process some information and then construct a SQL insert command to be included in a batch insert to the DB. I setup a global variable to store the batch commands and also a counter to keep track of the number of pending inserts. I tried to use synclock to lock the two global variables while they are updated but this code section seems to be causing my app to work up to 100% cpu usage. I'm really at a loss as to how to troubleshoot this issue. Does anyone have any suggestions?
'construct the SQL insert statement = strSQL
BatchSQLCount += 1
'End of thread