SqlDataSource - command timeout?

Discussion in 'ASP .Net' started by Sasa ., Sep 22, 2004.

  1. Sasa .

    Sasa . Guest

    Hello,

    I was wondering if it is possible to set command timeout for the
    SQLDataSource control. Documentation on this topic is scarce and I
    could not find anything on the internet either. Anybody has an idea?

    Thanks,
    Sasa .
    Sasa ., Sep 22, 2004
    #1
    1. Advertising

  2. Sasa .

    chanmmn Guest

    I would suggest you give the precise error. At the mean time this might
    helps:

    http://msdn.microsoft.com/library/d...nectionPoolingForSQLServerNETDataProvider.asp

    chanmm

    "Sasa ." <> wrote in message
    news:...
    > Hello,
    >
    > I was wondering if it is possible to set command timeout for the
    > SQLDataSource control. Documentation on this topic is scarce and I
    > could not find anything on the internet either. Anybody has an idea?
    >
    > Thanks,
    > Sasa .
    chanmmn, Sep 22, 2004
    #2
    1. Advertising

  3. Sasa .

    Sasa . Guest

    As the selectQuery of my SQLDataSource control I have a parameterized
    query that depending on parameters supplied sometimes takes quite a
    long time to execute.

    SQLDataSource control is a data source for GridView control.
    Sometimes, using this setup, I get error:
    "System.Data.SqlClient.SqlException: Timeout expired."

    If I bind GridView to say SqlDataReader that is created
    programmatically, I can set up command timeout to any desired value
    and get the thing working without problems. However, I would like to
    use SQLDataSource control as data source but I do not know how to set
    up command timeout... Idea, anybody?

    Sasa .


    "chanmmn" <> wrote in message news:<#>...
    > I would suggest you give the precise error. At the mean time this might
    > helps:
    >
    > http://msdn.microsoft.com/library/d...nectionPoolingForSQLServerNETDataProvider.asp
    >
    > chanmm
    >
    > "Sasa ." <> wrote in message
    > news:...
    > > Hello,
    > >
    > > I was wondering if it is possible to set command timeout for the
    > > SQLDataSource control. Documentation on this topic is scarce and I
    > > could not find anything on the internet either. Anybody has an idea?
    > >
    > > Thanks,
    > > Sasa .
    Sasa ., Sep 23, 2004
    #3
  4. SOLUTION - SqlDataSource - command timeout?

    I found it in case anyone at a later date looks for this.

    Add a Selecting Event to the SqlDataSource and then add

    the following to the Selecting

    e.Command.CommandTimeout = 5000 'For example

    Have Fun

    Chris


    Sasa . wrote:
    > As the selectQuery of my SQLDataSource control I have a parameterized
    > query that depending on parameters supplied sometimes takes quite a
    > long time to execute.
    >
    > SQLDataSource control is a data source for GridView control.
    > Sometimes, using this setup, I get error:
    > "System.Data.SqlClient.SqlException: Timeout expired."
    >
    > If I bind GridView to say SqlDataReader that is created
    > programmatically, I can set up command timeout to any desired value
    > and get the thing working without problems. However, I would like to
    > use SQLDataSource control as data source but I do not know how to set
    > up command timeout... Idea, anybody?
    >
    > Sasa .
    >
    >
    > "chanmmn" <> wrote in message

    news:<#>...
    > > I would suggest you give the precise error. At the mean time this

    might
    > > helps:
    > >
    > >

    http://msdn.microsoft.com/library/d...nectionPoolingForSQLServerNETDataProvider.asp
    > >
    > > chanmm
    > >
    > > "Sasa ." <> wrote in message
    > > news:...
    > > > Hello,
    > > >
    > > > I was wondering if it is possible to set command timeout for the
    > > > SQLDataSource control. Documentation on this topic is scarce and

    I
    > > > could not find anything on the internet either. Anybody has an

    idea?
    > > >
    > > > Thanks,
    > > > Sasa .
    WertmanTheMad, Feb 15, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?cm9iIGx5bmNo?=

    SQLDatasource/StoredProc/Dataview Update Command Q..

    =?Utf-8?B?cm9iIGx5bmNo?=, Jun 1, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,759
    =?Utf-8?B?cm9iIGx5bmNo?=
    Jun 1, 2005
  2. =?Utf-8?B?RGFycmVuQg==?=

    How to set sql timeout on the sqldatasource control

    =?Utf-8?B?RGFycmVuQg==?=, Jun 7, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    33,940
    Unsurreality
    Dec 18, 2009
  3. Replies:
    1
    Views:
    1,025
  4. John Kotuby
    Replies:
    2
    Views:
    1,378
    John Kotuby
    Mar 27, 2007
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,250
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page