473,473 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Getting a Timeout using an ObjectDataSource

I've got a report that is using an ObjectDataSource 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 ObjectDataSource to do this. How can I set
the Timeout property on an ObjectDataSource?

Thanks,

Andrew
Sep 24 '08 #1
1 2372
Andrew Cooper wrote:
I've got a report that is using an ObjectDataSource 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 ObjectDataSource to do this. How can I set
the Timeout property on an ObjectDataSource?

Thanks,

Andrew

Okay, this really shouldn't be as hard as it is turning out to be. It
looks like the only way to access the CommandTimeOut property on the
ObjectDataSource is to create a Partial Class and then set the property
there. Here's the code I got online to do this...

-------------------

Namespace programTableAdapters
{
Partial Public Class OrderTableAdapter
{
public void SetCommandTimeout(int timeout)
{
foreach (IDbCommand command in CommandCollection)
command.CommandTimeout = timeout;
}
}
}

-------------------

I tried converting it over to VB but I've run into problems. My code is
below. This issue is that the CommandCollection 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.VisualBasic

Namespace NewReportingDataSet
Partial Public Class usp_Billing_Report_by_MainTableAdapter
Public Sub SetCommandTimeout(ByVal timeout As Integer)
Dim test As System.Data.IDbCommand

For Each test In CommandCollection
test.CommandTimeout = timeout
Next
End Sub
End Class
End Namespace

-------------------

Thanks,

Andrew
Sep 24 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jim Hammond | last post by:
It would be udeful to be able to get the current on-screen values from a FormView that is databound to an ObjectDataSource by using a callback instead of a postback. For example: public void...
2
by: Kjetil Klaussen | last post by:
Hi, I’m having some troubles trying to bind my dataset to a GridView control through an ObjectDataSource control. The binding works fine for regular columns in my dataset, but I can’t seem...
0
by: David Hubbard | last post by:
I am using a GridView to display a set of objects that have a parent-child relationship. Each object, MyBO, has an ID property that is used to get the children of that object. class MyBO { ...
0
by: koekemoerzj | last post by:
I have a dataset that is filled by a sp in SQL2005. The sp results can be 1 - 100 records. Depending on the parameters. The execution time can take up to 2 min. Depending on the parameters. The...
0
by: =?Utf-8?B?cGI2NDgxNzQ=?= | last post by:
We have been having this problem for months and always assumed it was because of our somewhat complicated setup. I have just spent almost all of today making this into a simple example that can be...
1
by: Barry L. Camp | last post by:
Hi all, Wondering if someone can help with a nagging problem I am having using a GridView and an ObjectDataSource. I have a simple situation where I am trying to delete a row from a table, but...
1
by: jobs | last post by:
I have a GRIDVIEW I have bound to an OBJECTDATASOURCE that has the select pointing to a class method that uses ADO to grab a dataset from SQL Server Stored Procedure. One of the columns that...
13
by: SAL | last post by:
Okay, don't bash me to hard for my design on this app, it's my first web app and it's in production. My basic design is using Datatables created via the designer with a business logic class in...
0
by: Andrew Cooper | last post by:
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.