I've had a previous question running but I posted in wrong zone so here is the continuation.
I have been trying to wire up a CommandTimeout to an ObjectDatasource without success.
I have a DataSet.xsd with a table adaptor and I have created a partial class with the same namespace and am calling the code within that from the ObjectCreated method of the ObjectDataSource.
It isn't however working.
What am I doing wrong here?
public partial class ReplenReportsTableAdapter
public void SetCommandTimeout(int timeout)
for (int i = 0; i < this.CommandCollection.Length; i++)
if (this.CommandCollection[i] != null)
this.CommandCollection[i].CommandTimeout = timeout;
//Pres ASPX CS page
protected void ObjectDataSource1_ObjectCreated(object sender, ObjectDataSourceEventArgs e)
if (e.ObjectInstance != null)
DataSet1TableAdapters.ReplenReportsTableAdapter adapter = new DataSet1TableAdapters.ReplenReportsTableAdapter();