本文介绍了连接超时问题与MySqlDataAdapter有关,如何超出此范围。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个选择查询来填充数据集,该数据集执行tiimes并提供Timeout异常。如何超过连接超时限制。



超时: -

I have written a select query to fill a dataset, that takes tiimes to execute and gives Timeout exception. how to exceed connection timeout limit.

Timeout :-

引用:

超时已过期。操作完成之前经过的超时时间或服务器没有响应。

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.



下面是代码: -


below is the code :-

try
            {

                string strQry = "select distinct invoice_date,(select sum(amount) from sold_items B where B.invoice_date = A.invoice_date and B.pay_mode=A.pay_mode and tax_percent = '00.00') as taxFree,(select sum(amount) from sold_items C where C.invoice_date = A.invoice_date and C.pay_mode=A.pay_mode and tax_percent =  '5.00') as amountSub5,(select sum(amount) from sold_items D where D.invoice_date = A.invoice_date and D.pay_mode=A.pay_mode and tax_percent =  '14.00') as amountSub14,pay_mode from sold_items A where invoice_date between '" + dtfrom + "' and '" + dtto + "'";
                               
                MySqlDataAdapter da = new MySqlDataAdapter(strQry, con);
                DataSet2 ds1 = new DataSet2();
                da.Fill(ds1, "saletaxreport");
                CRsaletaxreport pr = new CRsaletaxreport();
                pr.SetDataSource(ds1);
                pr.VerifyDatabase();
                crystalReportViewer1.ReportSource = pr;
            }
            catch (Exception ex)
            {
                throw ex;
            }





需要你的帮助。请帮帮我。



need your assistance. please help me out.

推荐答案


这篇关于连接超时问题与MySqlDataAdapter有关,如何超出此范围。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 00:41