473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

How to set sql timeout on the sqldatasource control

Hi
I have a query which takes longer than the default (30seconds I guess) time
to process (I am using the full text index in a sql server stored
procedure!). The results are place on a web page using the gridview and the
sql datasource controls.

In .Net 1.1 I guess I would have used the command.timeout property (I
already know that the web.config httpRuntime executionTimeout setting and the
sql connection timeout don't affect this the timeout I'm getting)

I am wondering how I access the sql timeout property with these new .net 2.0
controls which are great by the way.

I am guessing that I somehow reach into a the equivalent of the sqlcommand
in the datasource_selecting event and set the property. Anyone done this or
have any ideas?
Jun 7 '06 #1
1 17159
Hi,

Thank you for your post.

You can set the select command's timeout value in SqlDataSource's Selecting
event:

protected void SqlDataSource1_Selecting(object sender,
SqlDataSourceSelectingEventArgs e)
{
e.Command.CommandTimeout = 30;
}

Hope this helps.

Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 8 '06 #2

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

Similar topics

0
by: aa | last post by:
I am using gridview and sqldatasource controls. When Gridview rows is creating I want to view the row's columns from database, which it is in select command in sqldatasource control, but not in...
2
by: wubin_98 | last post by:
Hi All, Could any expert point out what is wrong in my code? I search around but couldn't found answer. It seems that I am the first person have this problem. Thanks in advanced I have a...
1
by: Dan Sikorsky | last post by:
I've tried to set the SELECT command in a SqlDataSource control for a FormView to read the aspnet_Users table but get an exception saying I don't have permission. How can I resolve this? --...
0
by: Sean | last post by:
Using SqlDataSource controller with sprocs and its been working fairly well. I changed a table by removing a foreign key, removing 2 columns and adding 3. I rewrote the update sproc and works fine...
1
by: gabe | last post by:
Hi, I have 2 scenarios. (1) works, but (2) doesn't ------------------------------------------------------------ 1) I have sqldatasource control using OracleClient. I'm setting the attributes...
2
by: John Kotuby | last post by:
Hi all, I have set up a page with a Repeater and a SQLDatasource control, the data control suggested by online Help for use with the Repeater. I am getting Timeout Expired after 30 seconds. I...
2
by: Hrvoje Vrbanc | last post by:
Hello all! As I have only recently started to use native ASP.NET 2.0 data access controls (and found them to be very powerful), I have one question that I was unable to find the answer to: -...
0
by: Sobin Thomas | last post by:
Hi All, How can I bind the Gridview control to Sql Datasource control on a button click(I see majority of the articles binding datasource at page load) I need to enable the paging and sorting of...
1
by: Sobin Thomas | last post by:
Hi All, How can I bind the Gridview control to Sql Datasource control on a button click(I see majority of the articles binding datasource at page load) I need to enable the paging and sorting of...
1
by: sm2010 | last post by:
Hi, I have a SQLDatasource control on a web page. It is the datasource for a gridview control. At the moment i have in the contractID and duration text property the symbol '%', however If I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
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...

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.