Page 1 of 1

CommandTimeOut Error : ASP.net 2.0 DataSource controls and MySQL

Posted: Tue 28 Nov 2006 22:09
by robbhill
I am running MySQL Server 5.0 along with ASP.Net 2.0 with VS 2005.

I am getting a timeout error when reaching 30 seconds between mysql and the datasource control.

I have defined the control in my aspx page like so...

"
datasourcemode="DataSet"
providerName="CoreLab.MySql" />



In my webconfig file my connectionstring is like this:




In my vb.net code behind..I populate the datasource control with a string like so:

DataSource.SelectCommand = "queryString"

The mysql query takes about 70 seconds from mysql to run....asp.net timesout at 30..which I believe is the defaul for the command timeout..

I cannot figure out how to change the command timeout...

I am still running my trial version..

Please help.

Posted: Wed 29 Nov 2006 13:56
by robbhill
I Do not have timeout as an option to choose from...

these are what im importing:
Am I missing something?

Imports System.Data.SqlClient
Imports System.data
Imports System.Drawing
Imports System.Configuration.AppSettingsSection
Imports System.IO
Imports System.Runtime.Serialization
Imports System.Diagnostics
Imports CoreLab.MySql

Posted: Wed 29 Nov 2006 14:36
by Alexey
Configuring SqlDataSource component topic is beyond the scope of our support program. Please refer to MSDN.

Posted: Wed 29 Nov 2006 14:52
by robbhill
Actually I found a way around it.

Here is my code....


Protected Sub DataSource_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles DataSource.Selecting
e.Command.CommandTimeout = 200
End Sub


This changes the timeout on the command....when using a sqldatasource control.

Posted: Fri 08 Dec 2006 12:03
by Alexey
Good decision.