473,770 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing the Timeout property on an ObjectDataSourc e

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
Sep 24 '08 #1
0 2293

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

Similar topics

3
83246
by: MSR | last post by:
Hi, I have a query that takes 1 min 50 secs to execute in Query analyser (SQL Server 2000). When i execute this query from vb using ADO i get the 'Timeout Expired' error. I have tried setting the Connection.Timeout property to the ADO connection object but it doesn't work. Can anybody tell me how can i set the Connection.Timeout property in both vb and SQL Server.
4
4186
by: Jack | last post by:
Hi, I was wondering if for an application, I can change the default session timeout property via IIS Administration? If so, how does one do it. Thanks in advance.
0
338
by: Joey Chömpff | last post by:
LS, I've an object who has an readonly property named Id, this property is filled from the database with an Identity-value. When I execute "DetailsView1.UpdateItem(true);" then I get the following exception: The 'Id' property on the type specified by the DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1' is readonly and its
0
2368
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 data is used in a web report in vs2005. The problem is if the sp executes les than 30 seconds, I get results. As soon as the time exceeds 30 seconds. I get the time out error. I have added "connection timeout=600" in the connection string. But...
0
3640
by: Anabela Silva | last post by:
To anyone who has experienced this problem! Could not find a property named '... ' on the type specified by the DataObjectTypeName property in ObjectDataSource '...' I've been looking at forums about the problem that devellopers have in using ObjectDataSource when trying to update or delete a record. There has been a lot of talk like... you have to implement a list if you wanna use direct methods in such operations, etc etc
0
6991
by: Bryce Fischer | last post by:
I've got a simple (I think) asp.net application. I've created a DataSet in App_Code/ItemDataSet.xsd. Tested connection, seemed to work fine. In my ASPX file, I first dropped an ObjectDataSource onto the form, and pointed it to the dataset created above. I then dropped a GridView on the form, and selected the ObjectDataSource I created above. In the Design view it seems to be at least loading the
1
1809
by: KJ | last post by:
Hello all, I have several objects which use indexers, such as (in C#): public string this { get { return BaseEntity; }
1
3538
by: Allan Ebdrup | last post by:
I have a asp.net v2 website that runs fine on our development server. I have published the website to a stage server and it runs fine, but when I publish it to production I get the following error: The type specified in the TypeName property of ObjectDataSource 'PositionPostingsDataSource' could not be found. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more...
1
2418
by: Andrew Cooper | last post by:
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
0
9618
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9906
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.