如何为ObjectDataSource(ASP.NET 2.0)设置commandTimeout? [英] How to set commandTimeout for ObjectDataSource (ASP.NET 2.0)?

查看:62
本文介绍了如何为ObjectDataSource(ASP.NET 2.0)设置commandTimeout?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部。


在我的网站上,我有一些ObjetDataSource。它的业务对象

属性设置为我在数据集设计器中创建的数据集(这个

数据集有表适配器)。


我的问题是:如何从这个表适配器设置填充方法的命令超时属性




提前谢谢,

Piotrek。

解决方案

任何人?


timeout通常在连接字符串中设置。我不知道是否

还有另一个地方可以指定它。如果你想在你的程序中使用相同的

超时,那么只需在全局设置超时值

。如果你想在不同的地方使用不同的超时,

你可以动态地建立连接字符串(但是,请注意,这可能会降低连接池的效率)。


希望这会有所帮助...


- jeff


< blockquote>谢谢jd。


但是,我不想设置连接超时但命令超时。在

连接字符串中只能设置连接超时。


Piotrek


HI all.

In my web site I have some ObjetDataSource. Its business object
property is set to my dataset I created in dataset designer (this
dataset has table adapter).

My question is: how can I set command timeout property for fill method
from this table adapter?

Thanks in advance,
Piotrek.

解决方案

Anybody?


The timeout is normally set in the connection string. I don''t know if
there''s another place to specify it. If you want to use the same
timeout everywhere in your program, then just set the timeout value
globally. If you want to use different timeouts in different places,
you can dynamically build the connection string (note, however, that
this may reduce the effectiveness of connection pooling).

Hope this helps...

-- jeff


Thanks jd.

However, I don''t want to set Connection timeout but Command timeout. In
connection string only Connection timeout can be set.

Piotrek


这篇关于如何为ObjectDataSource(ASP.NET 2.0)设置commandTimeout?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆