Command Timeout after upgrading from 2009.1.400 to 2011.3.1200

Stimulsoft Reports.NET discussion
Post Reply
mmurdock
Posts: 94
Joined: Tue Mar 20, 2007 4:59 pm

Command Timeout after upgrading from 2009.1.400 to 2011.3.1200

Post by mmurdock »

I have upgraded from 2009.1.400 to 2011.3.1200. I am connecting to a MySQL database using the latest MySQL connector pack from your site and the latest MySQL .net connector from MySQL.com. I am getting the following error on longer running reports "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding." I did not have this error before the upgrade. I checked to make sure that the Command Timeout option is set sufficiently long. It seems to timeout after 30 seconds regardless of what I choose.

Thanks,

Mat
mmurdock
Posts: 94
Joined: Tue Mar 20, 2007 4:59 pm

Command Timeout after upgrading from 2009.1.400 to 2011.3.1200

Post by mmurdock »

Ok. I should of mentioned I am compiling for .Net 4. I think I found the offending lines of code in the Mysql Database Connector. In the StiMySqlAdapterService.cs file there are the following lines:

#if (Net2)
dataAdapter.SelectCommand.CommandTimeout = sqlSource.CommandTimeout;
#endif


#if (Net2)
sqlSource.DataAdapter.SelectCommand.CommandTimeout = sqlSource.CommandTimeout;
#endif

If I remove the if statement on both of those and just leave:

dataAdapter.SelectCommand.CommandTimeout = sqlSource.CommandTimeout;
and
sqlSource.DataAdapter.SelectCommand.CommandTimeout = sqlSource.CommandTimeout;

It seems to solve the problem. I can run my reports and I do not get the time out. I believe because I am compiling for with .Net 4.0 it is not setting the command timeout value in the MySql adapter. I would still like to know the proper way to fix the problem. I'm sure there is a reason why it was set to only run with .Net 2.0. I'm just not a C# programmer so I'm not sure where the Net2 directive is being set and how to have it check for .Net 4.0 as well.

Thanks,

Mat
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Command Timeout after upgrading from 2009.1.400 to 2011.3.1200

Post by Alex K. »

Hello,

Thank you for your message. We will make changes in our data adapters on our site.

Thank you.
Post Reply