Note that there are some explanatory texts on larger screens.

plurals
  1. POCode getting stuck on insert query
    primarykey
    data
    text
    <p>I am running a windows form base application, I am using background worker class for httpwebrequest. And using a webbrowser control, both are saving data to an excel sheet. It was working fine or maybe it was luck , now I see sometime the code gets stuck on the insert statement, it just goes in the </p> <pre><code>myCommand.ExecuteScalar(); </code></pre> <p>does not come out .And after some time i see this:</p> <blockquote> <p>The CLR has been unable to transition from COM context 0x7833a8 to COM context 0x7838b0 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.</p> </blockquote> <p>The query where it gets stuck is:</p> <pre><code>try { myCommand.CommandText = "Insert into [outputsheet$] (website,[facebook page],DealTitle,Dealtime,Dealprice,Dealvalue,Dealdiscount,Dealsaving,Linktitle,address,Category,[Type of Deal]) Values('" + webaddress.Replace("'", "''") + "','" + facbookaddress.Replace("'", "''") + "','" + title.Replace("'", "''") + "','" + dealtime.Replace("'", "''") + "','" + amount.Replace("'", "''") + "','" + value.Replace("'", "''") + "','" + discount.Replace("'", "''") + "','" + saving.Replace("'", "''") + "','" + titleweb.Replace("'", "''") + "','" + address.Replace("'", "''") + "','" + categoryName.Replace("'", "''") + "','Now Deals')"; myCommand.ExecuteScalar(); } catch (Exception exp) { } </code></pre> <p>Kindly help, is there anything i need to do .How to avoid it. Thank you</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload