I am working on wpf application. This application is used to show the reports. For this I have two tabs: one tab to select the columns from listview and other filters, the second tab shows the result from sql table. Here for dynamic query I am making a query on server side and pass this in stored procedure as parameter there I am executing it using execute method.
Problem :
It works fine if I select some columns out of total 170, but when I select all columns in list view and try to go on other tab it remains on the same tab and throws the exception:
The CLR has been unable to transition from COM context 0xc40048 to COM context
0xc401b8 for 60 seconds.
there is thousands of rows fetch for this.
Question :
1.)how i can make execution fast for query.
2.)Steps to make table more fast for fatching data.
A few ideas:
BackgroundWorkerclass and work with theDispatcherin WPF.SuspendLayout/ResumeLayoutUltimately, you need to determine where in your call stack the performance problem is. The Visual Studio debugger should help with this, but you may need to use some other tools. Use SQL Profiler to analyze your Stored Procedure/SQL Server behavior. For the network connection, try something like WireShark.
EDIT: added Dispatch/BackgroundWorker link — you still need to know where the timeout is occurring.