I posted this in the aspnet newsgroup but thought I might have more luck
with an answer here. I'd really appreciate any help I can get. Thanks.
I've got a report that is using an ObjectDataSourc e to populate its
data. The problem is that the report takes longer than 30 seconds to
generate so it times out. If I were using an SQLDataSource object I
know how to set the Command.Timeout to account for this but I can't find
the Timeout property on the ObjectDataSourc e to do this. How can I set
the Timeout property on an ObjectDataSourc e?
It looks like the only way to access the CommandTimeOut property on the
ObjectDataSourc e is to create a Partial Class and then set the property
there. Here's the code I got online to do this...
-------------------
Namespace programTableAda pters
{
Partial Public Class OrderTableAdapt er
{
public void SetCommandTimeo ut(int timeout)
{
foreach (IDbCommand command in CommandCollecti on)
command.Command Timeout = timeout;
}
}
}
-------------------
I tried converting it over to VB but I've run into problems. My code is
below. This issue is that the CommandCollecti on doesn't seem to exist
anywhere. Any help with this would be greatly appreciated. It's
frustrating to have everything working and the only thing holding me up
is a stupid Timeout error.
-------------------
Imports Microsoft.Visua lBasic
Namespace NewReportingDat aSet
Partial Public Class usp_Billing_Rep ort_by_MainTabl eAdapter
Public Sub SetCommandTimeo ut(ByVal timeout As Integer)
Dim test As System.Data.IDb Command
For Each test In CommandCollecti on
test.CommandTim eout = timeout
Next
End Sub
End Class
End Namespace
-------------------
Thanks,
Andrew
with an answer here. I'd really appreciate any help I can get. Thanks.
I've got a report that is using an ObjectDataSourc e to populate its
data. The problem is that the report takes longer than 30 seconds to
generate so it times out. If I were using an SQLDataSource object I
know how to set the Command.Timeout to account for this but I can't find
the Timeout property on the ObjectDataSourc e to do this. How can I set
the Timeout property on an ObjectDataSourc e?
It looks like the only way to access the CommandTimeOut property on the
ObjectDataSourc e is to create a Partial Class and then set the property
there. Here's the code I got online to do this...
-------------------
Namespace programTableAda pters
{
Partial Public Class OrderTableAdapt er
{
public void SetCommandTimeo ut(int timeout)
{
foreach (IDbCommand command in CommandCollecti on)
command.Command Timeout = timeout;
}
}
}
-------------------
I tried converting it over to VB but I've run into problems. My code is
below. This issue is that the CommandCollecti on doesn't seem to exist
anywhere. Any help with this would be greatly appreciated. It's
frustrating to have everything working and the only thing holding me up
is a stupid Timeout error.
-------------------
Imports Microsoft.Visua lBasic
Namespace NewReportingDat aSet
Partial Public Class usp_Billing_Rep ort_by_MainTabl eAdapter
Public Sub SetCommandTimeo ut(ByVal timeout As Integer)
Dim test As System.Data.IDb Command
For Each test In CommandCollecti on
test.CommandTim eout = timeout
Next
End Sub
End Class
End Namespace
-------------------
Thanks,
Andrew